..拿金了 没给学校丢脸 A ....SB题啊 比赛的时候都没看 裸的一个bitset前缀和 先开一个1e4*1e4的二维bitset数组 初始第i个数组的值为1 << i (即B[i]=1 B[i]<<=i) 很容易我们可以知道要单独翻转某一位而不去影响其他位的话 方法是唯一的 然后我们从可以后往前DP 就可以知道要单独翻转某一位的话需要翻转那些位 最后的每次翻转过后的答案就是   上一个答案^PreL-1 ^PreR 注意用cout的话容易System Error......(…
链接:https://www.nowcoder.com/acm/contest/89/A 来源:牛客网 1.题目描述 The Great Wall story of Meng Jiangnv’s Bitter Weeping happened during the Qin Dynasty (221BC- 206BC). Meng jiangnv was a beauty in the Qin Dynasty, and she lived happily with her husband. At…
2018 ACM-ICPC 中国大学生程序设计竞赛线上赛:https://www.jisuanke.com/contest/1227 题目链接:https://nanti.jisuanke.com/t/26219 Rock Paper Scissors Lizard Spock Description: Didi is a curious baby. One day, she finds a curious game, which named Rock Paper Scissors Lizard…
2018 ACM-ICPC 中国大学生程序设计竞赛线上赛:https://www.jisuanke.com/contest/1227 题目链接:https://nanti.jisuanke.com/t/26172 Clever King Description: In order to increase the happiness index of people's lives, King Y has decided to develop the manufacturing industry v…
如下图这是“今日头条杯”首届湖北省大学程序设计竞赛的第一题,作为赛后补题 题目描述:链接点此 这套题的github地址(里面包含了数据,题解,现场排名):点此 Let  be a regualr triangle, and D is a point in the triangle. Given the angle of . Then let AD, CD and BD form a new triangle, what is the size of the three angles? 输入描述:…
下了动车后,又颠颠簸簸的在公交车上过了接近一个小时,本来就晕车,于是,到的时候脑子晕死了,而且想吐.可能是没吃早饭的缘故,午饭好好次QWQ. 开幕式 还是第一次在这种环境下参赛,记得以前是看老师发的学长比赛的场景就是这个样子的,所有的人都在一个大的体育馆里面.找到自己的座位坐下来后,和队友感慨了一番,开幕式就开始了,然后是各种致辞,在参赛选手致辞时,被他的语言感染到,感觉就应该奋斗再奋斗,直到看到自己想得到的成绩.哒哒哒,时间就过去了,因为是在比赛场地开幕式,结束后很快就进行热身赛了. 热身赛…
三道大水题,其它题都不会做,真是尴尬和无奈啊…… 有想法,但是解决不了,感觉个人不会一些基本解法,终究还是个人学习的内容太少了 B. Goldbach /* 数值较小,<2^63,分解的两个素数较小,其中一个小于xxx(etc. 1e5) 生成1~x的素数:O(n) 判断素数不能只用已求出的素数相除,这样结果不对.而且这个方法速度太慢. Code largely studys from https://paste.ubuntu.com/p/JmDk43TTPB/ 米勒拉宾素数测试 https:/…
若干年之前的一道题,当时能写出来还是超级开心的,虽然是个板子题.一直忘记写博客,备忘一下. 米勒拉判大素数,关于米勒拉宾是个什么东西,传送门了解一下:biubiubiu~ B. Goldbach 题目传送门 自己看题意吧,直接贴代码了. 代码: #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<cstdlib> #include<al…
Description: There is a positive integer X, X's reversion count is Y. For example, X=123, Y=321; X=1234, Y=4321. Z=(X-Y)/9, Judge if Z is made up of only one number(0,1,2...9), like Z=11,Z=111,Z=222,don't consider '+'and '-'. Input: Input contains of…
Description: The elderly aunts always like to look for bargains and preferential merchandise. Now there is a shop carrying out group purchase promotion. Rules are as follows : There are r pieces of promotional items, and each item is only one. In the…