随笔分类 - BOJ
http://acm.bupt.edu.cn/onlinejudge/
摘要:Shoot Accept:7 Submit:7 Time Limit:1000MS Memory Limit:65536KBDescriptionKimi has two types of guns in his gun box. When Kimi use Gun 1 to shoot, there's a probability of p to hit the target. Meanwhile, when he uses Gun 2, the probability of making an accurate shoot becomes q.One day, Kimi went
阅读全文
摘要:Maximum Accept:5 Submit:24 Time Limit:1000MS Memory Limit:65536KBDescriptionDefine f(x) as the number of 1s under base 2. For instance, f(5)=2 for (5)10=(101)2, and f(7)=3 for (7)10=(111)2.Given [A,B], you're required to figure out the maximum f(x) where x is in range [A,B].Input FormatAn intege
阅读全文
摘要:Easy Game Accept:7 Submit:7 Time Limit:1000MS Memory Limit:65536KBDescriptionIt's going to be a very easy game to all of you, and that's why the problem is placed at problem A.There are n coins on the desk. Alice and Bob are taking these coins alternately, and Alice starts first. The rules a
阅读全文
摘要:Largest Square Accept:24 Submit:50 Time Limit:5000MS Memory Limit:65536KB DescriptionGive you a N*N(1≤N≤2000)Square.For each grid in the square,its color is red or black.Your task is to find a largest red square.InputFormatThe first line is an integer T(1≤T≤5) indicating the case number.For each...
阅读全文
摘要:TrianglesAccept:12 Submit:28 Time Limit:1000MS Memory Limit:65536KBDescriptionThere are points given in a space. There are no three points, such that they lie on the same straight line. Each pair of points is connected by a segment coloured red or black. Each triangle, whose sides have the same colo
阅读全文
摘要:Job Scheduling Accept:13 Submit:24 Time Limit:1000MS Memory Limit:65536KB Job SchedulingDescriptionWe are given independent and indivisible jobs numbered from 1 to N . They should be executed sequentially in any order. The later the execution of a job starts the longer it lasts - precisely, the t...
阅读全文
摘要:RectangleAccept:11Submit:14Time Limit:1000MSMemory Limit:65536KBRectangleDescriptionGiven three vertices of a rectangle on a 2D plane, you're required to determine the coordinate of the fourth vertex.Input FormatAn integer T(T≤100) will exist in the first line of input, indicating the number of
阅读全文
摘要:WinnerAccept:8Submit:15Time Limit:1000MSMemory Limit:65536KBWinnerDescriptionAlice and Bob likes playing games. In each round, the one who wins will get one point. When one of them makes his/her points reach 11 firstly, we say he/she has won a set of game, and they will start the next set. However,
阅读全文
摘要:BOJ 1 : http://www.cnblogs.com/lzj-0218/archive/2013/05/05/3060902.htmlBOJ1561 :http://www.cnblogs.com/lzj-0218/p/3181336.htmlBOJ 1562 : http://www.cnblogs.com/lzj-0218/p/3181351.htmlBOJ 1573 : http://www.cnblogs.com/lzj-0218/p/3187252.htmlBOJ 1575 : http://www.cnblogs.com/lzj-0218/p/3185578.htmlBOJ
阅读全文
摘要:A+B ProblemAccept:3524 Submit:8578Time Limit:1000MS Memory Limit:4000KBDescriptionCalculate a+bInput Two integer a,b (0<=a,b<=100)Output Output a+bSample Input 1 1Sample Output 2[C++] 1 #include<iostream> 2 3 using namespace std; 4 5 int main() 6 { 7 int a,b; 8 while(cin>>a>>
阅读全文

浙公网安备 33010602011771号