08 2017 档案
摘要:Description Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by wa
阅读全文
摘要:Description You are given N sets, the i-th set (represent by S(i)) have C(i) element (Here "set" isn't entirely the same as the "set" defined in mathe
阅读全文
摘要:Consider a N*N*N lattice. One corner is at (0,0,0) and the opposite one is at (N,N,N). How many lattice points are visible from corner at (0,0,0) ? A
阅读全文
摘要:Problem Description As an eligible Ingress Resistance Agent you should know your power source, the Exotic Matter.We call it XM, which is the driving f
阅读全文
摘要:Problem Description 众所周知,度度熊非常喜欢数字。它最近发明了一种新的数字:Valley Number,像山谷一样的数字。当一个数字,从左到右依次看过去数字没有出现先递增接着递减的“山峰”现象,就被称作 Valley Number。它可以递增,也可以递减,还可以先递减再递增。在递
阅读全文
摘要:Problem Description > The Death Star, known officially as the DS-1 Orbital Battle Station, also known as the Death Star I, the First Death Star, Proje
阅读全文
摘要:Problem Description We define the distance of two strings A and B with same length n isdisA,B=∑(i=0 n−1) |A[i]−B[n−1−i]|The difference between the two
阅读全文
摘要:Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is
阅读全文
摘要:Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is
阅读全文
摘要:3-idiots Problem Description King OMeGa catched three men who had been streaking in the street. Looking as idiots though, the three men insisted that
阅读全文
摘要:A * B Problem Plus Problem Description Calculate A * B. Input Each line will contain two integers A and B. Process to end of file.Note: the length of
阅读全文
摘要:const double pi = acos(-1.0);struct Complex { double r,i; Complex(double _r,double _i):r(_r),i(_i){} Complex(){} Complex operator +(const Complex &b) { return Complex(r+b....
阅读全文
摘要:2301: [HAOI2011]Problem b Description 对于给出的n个询问,每次求有多少个数对(x,y),满足a≤x≤b,c≤y≤d,且gcd(x,y) = k,gcd(x,y)函数为x和y的最大公约数。 Input Input 第一行一个整数n,接下来n行每行五个整数,分别表示
阅读全文