一.Description Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all…
题目链接: Water problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 23    Accepted Submission(s): 14 Problem Description If the numbers 1 to 5 are written out in words: one, two, three, four, fi…
https://codeforc.es/contest/1194/problem/B 好像也没什么思维,就是一个水题,不过蛮有趣的.意思是找缺黑色最少的行列十字.用O(n)的空间预处理掉一维,然后用O(n)的时间根据另一维计算出答案. #include<bits/stdc++.h> using namespace std; typedef long long ll; int n, m; string g[50005]; int rq[50005]; int main() { #ifdef Yi…
一.Description Eva的家庭作业里有很多数列填空练习.填空练习的要求是:已知数列的前四项,填出第五项.因为已经知道这些数列只可能是等差或等比数列,她决定写一个程序来完成这些练习. Input 第一行是数列的数目t(0 <= t <= 20).以下每行均包含四个整数,表示数列的前四项.约定数列的前五项均为不大于10^5的自然数,等比数列的比值也是自然数. Output 对输入的每个数列,输出它的前五项. 二.题解      又是水题啊,感觉不能这样下去了,不然我自己也变水了. 三.j…
Description Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all po…
A water problem 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5832 Description Two planets named Haha and Xixi in the universe and they were created with the universe beginning. There is 73 days in Xixi a year and 137 days in Haha a year. Now you k…
wyh2000 and a string problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 484    Accepted Submission(s): 232 Problem Description Young theoretical computer scientist wyh2000 is teaching you…
C. NP-Hard Problem 题目连接: http://www.codeforces.com/contest/688/problem/C Description Recently, Pari and Arya did some research about NP-Hard problems and they found the minimum vertex cover problem very interesting. Suppose the graph G is given. Subs…
A. Sweet Problem the first pile contains only red candies and there are r candies in it, the second pile contains only green candies and there are g candies in it, the third pile contains only blue candies and there are b candies in it. Each day Tany…
A. Math Problem Your math teacher gave you the following problem: There are n segments on the x-axis, [l1;r1],[l2;r2],-,[ln;rn]. The segment [l;r] includes the bounds, i.e. it is a set of such x that l≤x≤r. The length of the segment [l;r] is equal to…