Codeforces
文章平均质量分 77
tagyona
独立思考。不论是做题,还是人生。
展开
-
Codeforces Round #209 (Div. 2)赛后补题
这一场又是作死地从C题开始做,终于在比赛时把一道题做了两个小时...A. Table判断有没有点在边界上即可。B. Permutation令a[2*i-1]=2*i.a[2*i]=2*i-1.表达式的每一项均为1.要使两个表达式的差产生2*k,只要有k项大小颠倒,就会有k*(1-(-1))=2*k直接交换前k项a[2*i-1]与a[2*i]的值即可。C.原创 2013-11-05 17:49:58 · 656 阅读 · 3 评论 -
Codeforces Beta Round #67 (Div. 2)——A,B,C
A. Life Without Zerostime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputCan you imagine our life if we remove原创 2013-04-07 16:21:31 · 1997 阅读 · 0 评论 -
Codeforces Beta Round #65 (Div. 2)——A,B,C
A. Way Too Long Wordstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSometimes some words like "localizati原创 2013-04-06 12:34:49 · 1295 阅读 · 0 评论 -
Codeforces Round #177 (Div. 2)——A,B,C
A. Polo the Penguin and Segmentstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle penguin Polo adores原创 2013-04-03 19:11:37 · 1530 阅读 · 0 评论 -
Codeforces Round #169 (Div. 2)——C
C. Little Girl and Maximum Sumtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe little girl loves the pr原创 2013-02-27 19:07:54 · 693 阅读 · 0 评论 -
Codeforces Beta Round #52 (Div. 2)——B
B. Spoilt Permutationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya collects coins: he has exactly原创 2013-02-06 11:17:40 · 552 阅读 · 0 评论 -
Codeforces Beta Round #54 (Div. 2)——B
B. Coinstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn Berland a money reform is being prepared. New c原创 2013-02-06 14:18:23 · 488 阅读 · 0 评论 -
Codeforces Beta Round #49 (Div. 2)——C
C. Little Frogtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOnce upon a time a little frog whose name wa原创 2013-02-05 19:43:10 · 474 阅读 · 0 评论 -
Codeforces Beta Round #49 (Div. 2)—A
A. Autocompletetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAutocomplete is a program function that ena原创 2013-02-05 17:32:15 · 434 阅读 · 0 评论 -
Codeforces Beta Round #44 (Div. 2)——B
B. Coinstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day Vasya came across three Berland coins. The原创 2013-02-04 12:04:46 · 590 阅读 · 0 评论 -
Codeforces Beta Round #46 (Div. 2)——B
B. Sumtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya studies positional numeral systems. Unfortunat原创 2013-02-05 15:38:45 · 624 阅读 · 0 评论 -
Codeforces Beta Round #34 (Div. 2)——C
C. Page Numberstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output«Bersoft» company is working on a new versi原创 2013-02-01 13:59:29 · 623 阅读 · 0 评论 -
Codeforces Beta Round #31 (Div. 2, Codeforces format)——C
C. Scheduletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAt the beginning of the new semester there is n原创 2013-01-31 17:39:33 · 607 阅读 · 0 评论 -
Codeforces Beta Round #18 (Div. 2 Only)——C
C. Stripetime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputOnce Bob took a paper stripe of n squares (the hei原创 2013-01-30 15:14:04 · 428 阅读 · 0 评论 -
Codeforces Beta Round #69 (Div. 2 Only)——A,B,D
A. Panoramix's Predictiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA prime number is a number which原创 2013-04-07 22:17:53 · 1314 阅读 · 0 评论 -
Codeforces Beta Round #70 (Div. 2)——A,B,C
A. Haikutime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHaiku is a genre of Japanese traditional poetry.原创 2013-04-09 20:16:46 · 1903 阅读 · 0 评论 -
Codeforces Round #178 (Div. 2)——A,B
A. Shaass and Oskolstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputShaass has decided to hunt some birds.原创 2013-04-10 13:58:20 · 1212 阅读 · 0 评论 -
Codeforces Round #208 (Div. 2) 赛后补题
这一场突发奇想的想先从C题开始做,C题果然不会,D题是裸DP,比赛时还是没写出来。赛后问了kuangbin神的D题思路,挂了几遍后才自己敲出来了。A. Dima and Continuous Line 暴力判断两个圆是否相交。B. Dima and Text Messages先把n个单词串补成word1word2<3 ... wordn的形式。令其为s原创 2013-10-27 20:54:20 · 926 阅读 · 1 评论 -
Codeforces Round #207 (Div. 2) 赛后补题
rating又掉了,连续几场cf场场一题,太危险了。思维太过局限,平时反思的又太少,显然拙计。以后每场cf都写个总结,好好反思一下。A. Group of Students 水B. Flag Day 这题比赛时大概想了一下,没什么想法就放弃了,现在想来完全是太懒,连题目那么明确的提示都没有注意。每只队伍中最多只有1个人以前出现过(且最多只能出现一次)。所以每原创 2013-10-16 18:40:51 · 939 阅读 · 0 评论 -
Codeforces Round #186 (Div. 2)——A,B,C
C题拙计的写法显然TLE了-_-#A.正数直接输出,负数比较最后两位,删掉较大的那个数字,输出即可。B.sum[i]统计1到i内符合要求的数量,然后利用区间相减sum[r-1]-sum[l-1]即可。C.利用区间前缀和+排序。#include #include #include #include #include using namespace std;const in原创 2013-05-31 14:00:45 · 618 阅读 · 0 评论 -
Codeforces Round #185 (Div. 2)——A,B,C
本来准备长沙回来就搞英语4级的,没忍住又做了一场Cf玩-_-#A.判断首尾的子串即可。B.等比数列的求和公式,Sum=a1(1-q^n)/(1-q)然后公比为(1-a/b)*(1-c/d)(前偶数场两个人都失败),首项为a/bC.判断k与最坏情况n*(n-1)/2的关系,若k大于等于它,则构造一个所有点的横坐标相同的序列即可(这样if后面的语句就永远不会执行)英语4级何解,原创 2013-05-29 21:56:07 · 531 阅读 · 0 评论 -
Codeforces Round #184 (Div. 2)——A,B,C
被A题题意搞得出翔了。接着B题爆long long, C题看完比赛结束-_-#A. Strange Additiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard out原创 2013-05-20 15:36:53 · 1702 阅读 · 0 评论 -
Codeforces Beta Round #76 (Div. 2 Only)——A,B,C
A. Restoring Passwordtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIgor K. always used to trust his favo原创 2013-04-20 20:39:20 · 1444 阅读 · 0 评论 -
Codeforces Round #180 (Div. 2)——A,B,C,D
A. Snow Footprintstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a straight snowy road, divided i原创 2013-04-20 21:11:40 · 1535 阅读 · 0 评论 -
Codeforces Beta Round #75 (Div. 2 Only)——D
自己的代码1937MS险过,就不拿出来丢人了。感觉这份代码思路不错,拿出来分享一下。D. Queuetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output转载 2013-04-16 22:27:01 · 682 阅读 · 0 评论 -
Croc Champ 2013 - Round 1——E
E. Copying Datatime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe often have to copy large volumes of info转载 2013-04-16 22:33:30 · 844 阅读 · 0 评论 -
Codeforces Beta Round #74 (Div. 2 Only)——C
C. Robberytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt is nighttime and Joe the Elusive got into the原创 2013-04-16 15:00:57 · 701 阅读 · 0 评论 -
Croc Champ 2013 - Round 2 (Div. 2 Edition)——A,B,C
A. Ksusha and Arraytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputKsusha is a beginner coder. Today she s原创 2013-04-23 14:49:42 · 1346 阅读 · 0 评论 -
Codeforces Beta Round #77 (Div. 2 Only)——A,B,C
A. Footballtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya loves football very much. One day, as he原创 2013-04-22 21:37:42 · 1560 阅读 · 0 评论 -
Codeforces Round #179 (Div. 2)——C
test26时候跪了1次,后来发现是乘法时int溢出了。线段树版本:因为不需要查询,所以只在输出时将增减的信息传递到子结点。#include #include #define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define mid (l+r)>>1using namespace std;const int maxn=10000原创 2013-04-12 16:41:58 · 570 阅读 · 0 评论 -
Codeforces Beta Round #73 (Div. 2 Only)——A,B,C
A. Chordtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya studies music.He has learned lots of int原创 2013-04-12 21:03:24 · 1137 阅读 · 0 评论 -
Codeforces Beta Round #72 (Div. 2 Only)——A,B,C
A. Toy Armytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe hero of our story, Valera, and his best fri原创 2013-04-10 20:07:14 · 1147 阅读 · 0 评论 -
Codeforces Beta Round #18 (Div. 2 Only)——A
A. Triangletime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputAt a geometry lesson Bob learnt that a triangle原创 2013-01-29 16:24:00 · 540 阅读 · 0 评论 -
Codeforces Round #117 (Div. 2)——B
B. Vasya's Calendartime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya lives in a strange world. The year原创 2012-12-28 11:25:21 · 351 阅读 · 0 评论 -
Codeforces Round #123 (Div. 2)——B
B. After Trainingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter a team finished their training sess原创 2012-12-28 10:17:49 · 432 阅读 · 0 评论 -
Codeforces Round #110 (Div. 2)——B
B. Tracetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day, as Sherlock Holmes was tracking down one原创 2012-12-28 16:03:29 · 445 阅读 · 0 评论 -
Codeforces Round #126 (Div. 2)——B
B. Drinkstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Vasya loves orange juice very much. That's原创 2012-12-28 11:41:53 · 493 阅读 · 0 评论 -
Codeforces Round #109 (Div. 2)——B
B. Combinationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIlya plays a card game by the following rule原创 2012-12-28 16:39:37 · 518 阅读 · 0 评论 -
Codeforces Round #135 (Div. 2)——B
B. Special Offer! Super Price 999 Bourles!time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarpus is an转载 2012-12-25 20:29:13 · 504 阅读 · 0 评论 -
Codeforces Round #124 (Div. 2)——B
B. Limittime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two polynomials:P(x) = a0·原创 2012-12-26 16:19:20 · 551 阅读 · 0 评论