水题,推个公式出来,注意精度…一遍A
1 2 /************************************************************************* 3 > File Name: code/2015summer/#5/D.cpp 4 > Author: 111qqz 5 > Email: rkz2013@126.com 6 > Created Time: 2015年07月30日 星期四 13时17分26秒 7 …
阅读更多AMR10F - Cookies Piles
水.
1 2 3 /************************************************************************* 4 > File Name: code/2015summer/#4/F.cpp 5 > Author: 111qqz 6 > Email: rkz2013@126.com 7 > Created Time: 2015年07月29日 星期三 21时47分23秒 8 …
阅读更多http://acm.hdu.edu.cn/showproblem.php?pid=5310 水。 不要用cin.
1 2 /************************************************************************* 3 > File Name: code/bc/#ann/1001.cpp 4 > Author: 111qqz 5 > Email: rkz2013@126.com 6 > Created Time: 2015年07月25日 星期六 18时54分24秒 7 …
阅读更多http://acm.hust.edu.cn/vjudge/contest/view.action?cid=82557#problem/A
Zk的解法:拆点,把每一个点存成两份,r[i]和r[n+i]
连边的时候如果u和v相连,我们就分别连 u&&v; 和 u+n&&v;+n 和 u&&v;+n 其中最后一个存法是要使用魔法的情况…
阅读更多http://codeforces.com/contest/556/problem/C
果然一晚上不睡觉会导致读错题么…
需要注意的是 如果有一个是 1 2 4 6 那么 1,2是不必拆开的….
然后我们发现,只有以1为开始且连续的套娃不必拆开….
阅读更多最大连续区间和是一个经典的问题。给定一个长度为 n 的序列 a[1],a[2]…a[n-1],a[n],求一个连续的子序列 a[i],a[i+1]…a[j-1],a[j],使得 a[i]+a[i+1]…a[j-1]+a[j]最大。
阅读更多http://codeforces.com/problemset/problem/548/A
水题。分割成K个,每个串判断是否回文,如果都是就yes,否则no
需要注意的是,可能不能正好分成长度相同的K个,这个时候也要No
1 2 3 4 5 /* *********************************************** 6 Author :111qqz 7 Created Time :2016年03月03日 星期四 14时09分08秒 8 File Name :code/cf/problem/548A.cpp 9 …
阅读更多B. Tavas and SaDDas
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Once again Tavas started eating coffee mix without water! Keione told him that it smells awful, but he didn’t stop doing that. That’s why Keione told his smart friend, SaDDas to …
阅读更多