
codeforces
文章平均质量分 78
ThinkingLion
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #276 (Div. 2) C. Bits
题目链接:http://codeforces.com/contest/485/problem/C题目大意s原创 2014-11-08 17:29:42 · 364 阅读 · 0 评论 -
cf_298
源链接:http://codeforces.com/contest/534。。最近不知道为什么,,觉得做题目毫无状态。。略微迷茫。。A:连A都错了。。真的是。。题意就是把1-n个数排在一起,是的相邻的数相差不能为1.其实就是把奇数放在一起,,然后再把偶数放在一起。。可是事实是不能先放奇数,,比如n=4,如果先放奇数,那么就会有1 3 2 4这种情况,3和2就是差1了。。。。所以一定得先原创 2015-04-14 13:07:24 · 1070 阅读 · 0 评论 -
ZeptoLab Code Rush 2015
源地址:http://codeforces.com/contest/526最近做题实在是没有感觉,,略颓废。。A:暴力枚举#include#include#include#include#include#include#include#include#include#include#include#include#include#include#includ原创 2015-04-07 17:26:35 · 478 阅读 · 0 评论 -
cf_297
源地址:http://codeforces.com/contest/525A:读懂题意,模拟一下即可。#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include/原创 2015-03-27 17:04:46 · 622 阅读 · 0 评论 -
cf_296(Div2)
源链接:http://codeforces.com/contest/527A:模拟,画下图就知道了。#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include//#define O原创 2015-03-19 15:58:52 · 1294 阅读 · 0 评论 -
cf_292 Div.2
源地址:http://codeforces.com/contest/515A:输入三个数a,b,n.问能否用n步从(0,0)点走到(a,b)点,移动方向为上下左右。很明显,先求出到a,b至少移动几步,如果用n步都不能到达(a,b),那么显然不能。。如果n大于等于走到(a,b)的最小步数且(n-最小步数)为偶数时(即可以反复在用一个地方走动)时能够到达。#include#include原创 2015-03-02 19:52:45 · 455 阅读 · 0 评论 -
cf_287 C. Guess Your Way Out!
题目链接:http://codeforces.com/contest/507/problem/C题目大意:给你一个h那么深的二叉树,然后告诉你一个叶子节点编号,这个编号就是该二叉树的出口,编号是在最后一层(即叶子节点)从左到右的顺序。问你在深搜的过程中在遍历到出口点之前要遍历的节点的个数。这题自己做的时候出了点问题,所以参照别人博客的代码写的,在此非常感谢~我们一下子能想到的就是用原创 2015-01-24 14:21:58 · 496 阅读 · 0 评论 -
Codeforces Round #282 (Div. 2) C
题目链接:http://codeforces.com/contest/495/problem/C括号匹配。因为#只能翻译成),所以就统计)和(+#的个数,搞一搞。不过以前没怎么做过,其实属于YY题啦。。/* * ThinkingLion.cpp * * Created on: 2014年1月29日 * Author: dell */#include#i原创 2014-12-14 11:54:01 · 387 阅读 · 0 评论 -
Codeforces Round #269 (Div. 2) C
文章链接:http://codeforces.com/contest/471/problem/C题目大意就是给你n根火柴,让你拼出金字塔形,也就是上面层的room数要比下面的少。刚开始想的比较复杂了。。其实思路还是很简单的。。题目中说上下两层room可以不止相差1,其实我感觉这是个坑点。。题目求的是层数,,比如第一个例子,两层的有两种情况,但是都是只能到两层,所以我们就按照逐层原创 2014-12-11 23:36:02 · 351 阅读 · 0 评论 -
cf_290(div2)A,B,C
题目链接:http://codeforces.com/contest/510A:模拟题,照题说的画即可。#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include原创 2015-02-03 17:09:08 · 431 阅读 · 0 评论 -
Codeforces Round #284 (Div. 2) C
题目链接:http://codeforces.com/contest/499/problem/C题目大意:给你一个起点坐标和终点坐标,再给出n条路,它们的直线方程是a*x+b*y+c=0,其中的a,b,c是已知的,这些直线将平面分成很多块区域,每一步只能从有公共边的一块区域移动到另外一块,问你从起点坐标所在区域到终点坐标所在区域,至少走多少步路?想太复杂了,,其实仔细分析一下就很简原创 2014-12-25 22:56:14 · 345 阅读 · 0 评论 -
cf_288 C
题目链接:http://codeforces.com/contest/508/problem/C思路:在第一个鬼魂来之前先点燃所需的r根蜡烛,并把这r根蜡烛的点燃时间放入一个队列中,那么在第二个来的时候,我们先看之前最先点燃的蜡烛有没有灭,如果灭了,那么得重新点一根,并把点燃时间放入队列中,一直循环到所有ghost都访问结束,此时输出所需的蜡烛的根数。#include#include#原创 2015-01-28 16:52:15 · 848 阅读 · 0 评论 -
Codeforces Round #275 (Div. 2) B. Friends and Presents
题目链接:http://codeforces.com/contest/483/problem/B题目大意就是求一个最小的v,使得在集合 1.2.原创 2014-11-08 12:21:57 · 548 阅读 · 0 评论 -
Codeforces Round #277.5 (Div. 2) A
题目链接:http://codeforces.com/contest/489/problem/A总感觉这种题目shi原创 2014-11-21 17:09:56 · 259 阅读 · 0 评论 -
Codeforces Round #274 (Div. 2) D
题目链接:http://codeforces.com/contest/479/problem/D这道题目是练习set的好题原创 2014-11-01 11:13:17 · 387 阅读 · 0 评论 -
cf_301
源地址:http://codeforces.com/contest/540好久没做题了。。真是略微颓废。。感觉五一这三天本来挺空闲的,,但是什么都没做,也没出去玩。。烦。A:水题,对应每个数字,我们看下顺时针转还是逆时针转的路程会比较短。#include#include#include#include#include#include#include#include#in原创 2015-05-03 22:28:31 · 372 阅读 · 0 评论