Codeforces Round #297 (Div. 2)B. Pasha and String Time Limit: 2 Sec Memory Limit: 256 MBSubmit: xxx Solved: 2xx 题目连接 http://codeforces.com/contest/525/problem/B Description Pasha got a very beautiful string s for his birthday, the string consists o…
Codeforces Round #297 (Div. 2)A. Vitaliy and Pie Time Limit: 2 Sec Memory Limit: 256 MBSubmit: xxx Solved: 2xx 题目连接 http://codeforces.com/contest/525/problem/A Description After a hard day Vitaly got very hungry and he wants to eat his favorite pot…
Codeforces Round #297 (Div. 2)E. Anya and Cubes Time Limit: 2 Sec Memory Limit: 512 MBSubmit: xxx Solved: 2xx 题目连接 http://codeforces.com/contest/525/problem/E Description Anya loves to fold and stick. Today she decided to do just that. Anya has n c…
Codeforces Round #297 (Div. 2)D. Arthur and Walls Time Limit: 2 Sec Memory Limit: 512 MBSubmit: xxx Solved: 2xx 题目连接 http://codeforces.com/contest/525/problem/D Description Finally it is a day when Arthur has enough money for buying an apartment. H…
Codeforces Round #297 (Div. 2)C. Ilya and Sticks Time Limit: 2 Sec Memory Limit: 256 MBSubmit: xxx Solved: 2xx 题目连接 http://codeforces.com/contest/525/problem/C Description In the evening, after the contest Ilya was bored, and he really felt like ma…
题目链接:http://codeforces.com/contest/877/problem/B Nikita and string time limit per test2 seconds memory limit per test256 megabytes Nikita thinks that string is beautiful if it can be cut into 3 strings (possibly empty) without changing the order of t…
传送门 D. Arthur and Walls time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output Finally it is a day when Arthur has enough money for buying an apartment. He found a great option close to the cente…
传送门 E. Anya and Cubes time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Anya loves to fold and stick. Today she decided to do just that. Anya has n cubes lying in a line and numbered from 1…
当时打比赛的时候卡在D题了,没有看E.现在看来E还是不难的. 将n个数排序后,其实不排序也是可以的,只是排序能快一半的时间. 枚举前一半能得到多少种和,放到map里面: 然后在后一半数中枚举,然后在map里面查找. #include <bits/stdc++.h> using namespace std; typedef long long LL; ; LL a[maxn], f[maxn], S, ans; int n, m, k; map<int, LL> cnt[maxn];…
D. Arthur and Walls time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output Finally it is a day when Arthur has enough money for buying an apartment. He found a great option close to the center of…
C. Ilya and Sticks time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output In the evening, after the contest Ilya was bored, and he really felt like maximizing. He remembered that he had a set of …
C. Vasya and String 题目连接: http://www.codeforces.com/contest/676/problem/C Description High school student Vasya got a string of length n as a birthday present. This string consists of letters 'a' and 'b' only. Vasya denotes beauty of the string as th…
A. Pasha and Stick 题目连接: http://www.codeforces.com/contest/610/problem/A Description Pasha has a wooden stick of some positive integer length n. He wants to perform exactly three cuts to get four parts of the stick. Each part must have some positive…
B. Pasha and Tea Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/557/problem/B Description Pasha decided to invite his friends to a tea party. For that occasion, he has a large teapot with the capacity of w milliliters and…
B. Pasha and Phone Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/595/problem/B Description Pasha has recently bought a new phone jPager and started adding his friends' phone numbers there. Each phone number consists of ex…
B. Pasha and Phone time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Pasha has recently bought a new phone jPager and started adding his friends' phone numbers there. Each phone number consis…