Description You must have heard that the Chinese culture is quite different from that of Europe or Russia. So some Chinese habits seem quite unusual or even weird to us. So it is known that there is one popular game of Chinese girls. N gi…
A - Chinese Girls' Amusement Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others) SubmitStatus Problem Description You must have heard that the Chinese culture is quite different from that of Europe or Russia. So som…
Chinese Girls' Amusement Time Limit:1000MS Memory Limit:64000KB 64bit IO Format:%lld & %llu Submit Status Practice ACdream 1210 Description You must have heard that the Chinese culture is quite different from that of Europe or Russia.…
Chinese Girls' Amusement Time Limit: 2000/1000MS (Java/Others)Memory Limit: 128000/64000KB (Java/Others) SubmitStatisticNext Problem Problem Description You must have heard that the Chinese culture is quite different from that of Europe or Russia. So…
You must have heard that the Chinese culture is quite different from that of Europe or Russia. So some Chinese habits seem quite unusual or even weird to us. So it is known that there is one popular game of Chinese girls. N girls stand forming a circ…
Description Berland has n cities connected by m bidirectional roads. No road connects a city to itself, and each pair of cities is connected by no more than one road. It is not guaranteed that you can get from any city to any other one, using only th…
Description In Berland recently a new collection of toys went on sale. This collection consists of 109 types of toys, numbered with integers from 1to 109. A toy from the new collection of the i-th type costs i bourles. Tania has managed to collect n …
Description Maria participates in a bicycle race. The speedway takes place on the shores of Lake Lucerne, just repeating its contour. As you know, the lake shore consists only of straight sections, directed to the north, south, east or west. Let's in…
/* 实际上就是求一个k,满足k<=n/2,且gcd(n,k)=1 如果n为奇数,k为[n/2] 如果n为偶数,k=n/2-1-(n/2)%2 */ #include <iostream> using namespace std; string s; void div2() { string t; int l = s.size() - 1, tem = s[0] - '0'; if (tem > 1) t += '0' + tem / 2; tem &= 1; for (i…
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1313 题目意思:有 N 个人(编号依次为1~N)围成一个圆圈,要求求出最大的 K (1 ≤ K ≤ N/2),表示从编号为1的人开始,将球传递给他后一个人数起的第K个人,第K个人又传递给往后数的第K个人......要求这样传递下去,且每个人都有机会接到球.也就是不存在当未使得全部人都接到一次球的情况下,某个人接收到两次以上的球. 详细的解题报告在这里: http:/…
开始套题训练,第一套ASC题目,记住不放过每一题,多独立思考. Problem A ZOJ 2313 Chinese Girls' Amusement 循环节 题意:给定n,为圆环长度,求k <= n/2,从1出发,每次顺时针方向走k步,即1->k+1->2*k+1,直到遇到一个已经走过的点结束,要求最终把所有点访问一遍,最后回到1,使得k尽量大. 代码: Problem B ZOJ 2314 Reactor Cooling 无源汇上下界网络流 题意:经典题,有上下界无源无汇的可行流,对…
向别人学习一波,记点流水帐.17.5.29开坑. 5.29 早晨看了道据说是树状数组优化DP的题(hdu5542),然后脑补了一个复杂度500^3的meet in the middle.然后死T...弃疗. 上午考试有一道sb线段树和一道简单数位DP.还有一道是毕姥爷在WC讲的"超立方体".对着数据范围的表格写了半天部分分然后你告诉我测试数据和这个数据范围根本不一样? 并不会FWT,又因为不太想学新算法,就决定不改题了. 下午先把某个课件的坑填完了.然后在bzoj上乱逛. 决定写写SD…
Note 2: Complain 1. The collection of Linkun's [1]: 1.1suck If someone says that something sucks, they are indicating that they think it is very bad. [V] [feelings] [Informal] [RUDE]E.g., The system sucks. 1.2sick and tired of ... 1.3terrible 1.4horr…
目录 牛客网NOIP赛前集训营-普及组(第二场) A 你好诶加币 B 最后一次 C 选择颜色 D 合法括号序列 牛客网NOIP赛前集训营-提高组(第二场) A 方差 B 分糖果 C 集合划分 牛客网NOIP赛前集训营-普及组(第二场) 题目链接:https://www.nowcoder.com/acm/contest/165#question A 你好诶加币 设最大值为maxx,最小值为minn 分三种情况: \(1.a > 0 且b > 0\) 会加爆long long,所以化简式子 \(m…