随笔分类 -  Codeforces

1 2 下一页

Codeforces Round #273 (Div. 2)
摘要:A题1 s = sum(map(int, raw_input().split()))2 print s / 5 if s % 5 == 0 and s / 5 else -1B题1 n, m = map(int, raw_input().split())2 div, lft = n / m, n %... 阅读全文

posted @ 2014-10-17 22:56 Stomach_ache 阅读(170) 评论(0) 推荐(0)

Codeforces 467D
摘要:题目链接D. Fedor and Essaytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter you had helped Fedor... 阅读全文

posted @ 2014-09-19 22:07 Stomach_ache 阅读(270) 评论(0) 推荐(0)

Codeforces 463D
摘要:题目链接D. Gargari and Permutationstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGargari got bored... 阅读全文

posted @ 2014-08-31 22:45 Stomach_ache 阅读(323) 评论(0) 推荐(0)

Codeforces 455B
摘要:题目链接B. A Lot of Gamestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrew, Fedor and Alex are i... 阅读全文

posted @ 2014-08-13 16:43 Stomach_ache 阅读(428) 评论(0) 推荐(0)

Codeforces 455D
摘要:题目链接D. Serega and Funtime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSerega loves fun. However, ... 阅读全文

posted @ 2014-08-10 15:42 Stomach_ache 阅读(374) 评论(0) 推荐(0)

Codeforces 455C
摘要:题目链接C. Civilizationtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrew plays a game called "Ci... 阅读全文

posted @ 2014-08-09 12:13 Stomach_ache 阅读(230) 评论(0) 推荐(0)

Codeforces 451D
摘要:题目链接D. Count Good Substringstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe call a stringgood... 阅读全文

posted @ 2014-07-25 23:41 Stomach_ache 阅读(287) 评论(0) 推荐(0)

Codeforces 449B
摘要:题目链接B. Jzzhu and Citiestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputJzzhu is the president of... 阅读全文

posted @ 2014-07-20 22:23 Stomach_ache 阅读(316) 评论(0) 推荐(0)

Codeforces 113C
摘要:题目链接C. Double Happinesstime limit per test5 secondsmemory limit per test128 megabytesinputstandard inputoutputstandard outputOn the math lesson a teac... 阅读全文

posted @ 2014-07-20 14:23 Stomach_ache 阅读(278) 评论(0) 推荐(0)

Codeforces 3D
摘要:题目链接D. Least Cost Bracket Sequencetime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputThis is yet anot... 阅读全文

posted @ 2014-07-20 00:30 Stomach_ache 阅读(282) 评论(0) 推荐(0)

Codeforces 113B
摘要:题目链接B. Petr#time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLong ago, when Petya was a schoolboy... 阅读全文

posted @ 2014-07-19 10:45 Stomach_ache 阅读(766) 评论(3) 推荐(0)

Codeforces 436C
摘要:题目链接C. Dungeons and Candiestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDuring the loading of... 阅读全文

posted @ 2014-06-24 18:39 Stomach_ache 阅读(210) 评论(0) 推荐(0)

Codeforces 442B
摘要:题目链接B. Andrey and Problemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrey needs one more p... 阅读全文

posted @ 2014-06-24 13:31 Stomach_ache 阅读(335) 评论(0) 推荐(0)

Codeforces 442C
摘要:题目链接C. Artem and Arraytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputArtem has an array of n po... 阅读全文

posted @ 2014-06-24 13:29 Stomach_ache 阅读(326) 评论(0) 推荐(0)

Codeforces 442A
摘要:题目链接A. Borya and Hanabitime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHave you ever played Hana... 阅读全文

posted @ 2014-06-21 11:19 Stomach_ache 阅读(343) 评论(0) 推荐(0)

Codeforces 439C
摘要:题目链接比赛时间没能通过==, 只能说明自己代码写的太不严谨咯!解题思想就是贪心先判断无解的情况: 1. 奇数不够,因为偶数是无法凑成奇数的 2. 偶数不够,2个奇数可以凑成一个偶数 3. 在奇数够用的情况下, 先在k-p堆中每一堆都放一个奇数, 那么剩余的奇数个数一定是个偶数,否则必定会... 阅读全文

posted @ 2014-06-05 10:29 Stomach_ache 阅读(271) 评论(0) 推荐(0)

Codeforces 432C
摘要:题目链接题意: 给出一个长度为n(n File Name: C.cpp 3 > Author: Stomach_ache 4 > Mail: sudaweitong@gmail.com 5 > Created Time: 2014年05月15日 星期四 23时51分15秒... 阅读全文

posted @ 2014-05-16 19:15 Stomach_ache 阅读(407) 评论(0) 推荐(1)

Codeforces 425B
摘要:点击打开题目链接 题意:给定一个n×m的0,1矩阵,做多可以对矩阵做k次变换,每次变换只可以将矩阵的某一个元素由0变成1,或从1变成0。求最小的变换次数使得得到的矩阵满足:每一个连通块都是一个“实心”矩形。要想清楚的就是最终的矩阵一定是这样的: 010...1 0 1 ...0 1 0 ... 这样... 阅读全文

posted @ 2014-05-01 10:04 Stomach_ache 阅读(289) 评论(2) 推荐(0)

Codeforces 425A
摘要:点击打开题目链接这题想了将近一天。。越发觉得自己太弱(不过早已经习惯这样的自己了 :P)不过因为是自己独立想出来的,还是很高兴。拿到题目,当看到数据量的时候,就感觉很明显的暴力。 n×n×n×k也是可以过的思路:枚举所选取的区间,这是O(n^2),然后因为是最多可以交换k次,进行替换的时候,就是从你... 阅读全文

posted @ 2014-04-30 15:33 Stomach_ache 阅读(243) 评论(0) 推荐(0)

Codeforces 336C
摘要:这题是大一暑假时候做的,当时没有出,直到今天突然觉得应该把没过的题目再做一边,不然真的是越积越多。现在能够独立做出来真的是难以表达的兴奋,刚开始的时候就觉得 O(30 * 30 * n)的复杂度有点不安全,不过还是敲了,事实说明实际的负责度没这么高。和去年一样,没有思路,后来仔细一想,真的是数学题。... 阅读全文

posted @ 2014-04-08 19:02 Stomach_ache 阅读(272) 评论(0) 推荐(0)

1 2 下一页

导航