- 博客(5)
- 资源 (1)
- 收藏
- 关注
原创 Cf 102 Div.2
A题我是for循环暴力作的,题解里最牛逼的做法是O(1):O(1) solution - one may derive it from the previous approach: since x+c = d1 => 2*x + r1 - c1 = d1 => x = (d1+c1-r1)/2So, you find x, check that it is in [0..9
2012-01-26 18:09:06 524 1
原创 Cf 104 div.2
A题if all digits are lucky and sum of the digits of the first half equals to the sum of the digits of the second half, then answer is YES, in other case - NO. All this can be checked by single loop
2012-01-23 19:21:29 589
原创 2012-01-20 ACM群群赛
1005题codeforces上某题的加强版,我也是弄了好久才ac的,代码比较暴力,m,length都不是很大 100*11000*10(可能写错了),1s内还是ac了。其中字符串的左移问题,我是把s串加倍,变成s+s然后再对s+s进行一个for循环预处理,判定的时候注意长度小于和等于length_s,还注意起点。。。见代码。。。/*2012-01-20 20:42:38
2012-01-21 16:08:27 1002
原创 Cf 103 div.2
A题It's clear that the leftmost soldier with the maximum height should be the first and the rightmost soldier with the minimum height should be the last. Thus we will minimize the number of swaps.
2012-01-19 21:45:52 529
原创 USACO 2012 January Contest, Bronze Division
在达尔的指导下,第一次做了这类比赛,在 Observers 里面的成绩:CHNChuanshun Yuan833********x************xxx*x****排了30+,被达尔戈
2012-01-16 21:41:44 1361
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人