摘要:题目链接:http://codeforces.com/contest/734/problem/DD. Anton and Chesstime limit per test4 secondsmemory limit per test256 megabytesinputs...
阅读全文
摘要:题目链接: http://codeforces.com/contest/731/problem/AA. Night at the Museumtime limit per test1 secondmemory limit per test256 megabytesin...
阅读全文
摘要:题目链接:http://codeforces.com/contest/721/problem/BB. Passwordstime limit per test2 secondsmemory limit per test256 megabytesinputstandar...
阅读全文
摘要:题目链接:http://codeforces.com/contest/721/problem/AA. One-dimensional Japanese Crosswordtime limit per test1 secondmemory limit per test2...
阅读全文
摘要:题目链接:http://acm.csu.edu.cn/csuoj/problemset/problem?pid=1530对于一块2^n质量的gold。需要把它分成a质量和b质量(a+b=2^n),且每次分时是平分。问至少要平分多少次?其实只需要知道最小分块的质量,就能...
阅读全文
摘要:题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2868用暴力也过了:#include#includ...
阅读全文
摘要:直接上代码了:#include#include#include#include#include#include#include#include#include#include#define LL long long#define MAX(a,b) (a>b?a:b)#...
阅读全文
摘要:题目链接:https://odzkskevi.qnssl.com/1110bec98ca57b5ce6aec79b210d2849?v=1490453767题解:这种方法大概跟离散化扯上点关系:首先直接用数组去接这组输入,然后对数组进行排序。之后把相等的数并在一起,并...
阅读全文
摘要:题目链接:https://odzkskevi.qnssl.com/1110bec98ca57b5ce6aec79b210d2849?v=1490453767题解:方法1:用STL的set,把每个数放到相应的集合。在放之前如果找到相同的数,则invalid。方法2:由于...
阅读全文
摘要:题目链接:http://codeforces.com/problemset/problem/459/B题意:给出n支花,每支花都有一个漂亮值。挑选最大和最小漂亮值得两支花,问他们的差值为多少,并且有多少种选法(无先后顺序)。现场做时,想到的是:用multimap记录每...
阅读全文