Counting Game There are n people standing in a line, playing a famous game called ``counting". When the game begins, the leftmost person says ``1" lo....
分类:
其他好文 时间:
2014-07-19 00:20:58
阅读次数:
245
链接据说这题是垂心。。数学太弱没有看出来,写了分朴实无华的代码。。旋转三边得到图中的外顶点,然后连接三角形顶点求交点,交上WA。。觉得没什么错误就去看了下discuss,发现都在说精度问题,果断开始水,最后+了epsAC了。。 1 #include 2 #include 3 #include...
分类:
其他好文 时间:
2014-07-18 23:18:12
阅读次数:
302
线段树:延伸标记+暴力更新
记得刚学线段树的时候做这题WA了一版。。。。。现在分分钟搞定。。。。
Count the Colors
Time Limit: 2 Seconds Memory Limit: 65536 KB
Painting some colored segments on a line, some previously painted segm...
分类:
其他好文 时间:
2014-07-18 23:07:26
阅读次数:
330
// 预加载音乐和音效 SimpleAudioEngine::sharedEngine()->preloadBackgroundMusic(CCFileUtils::sharedFileUtils()->fullPathFromRelativeFile("fashu1.wav","fashu1.wa...
分类:
其他好文 时间:
2014-07-18 16:09:28
阅读次数:
259
初学者题:1001 1037 1048 1049 1051 1067 1115 1151 1201 1205 1216 1240 1241 1242 1251 1292 1331 1334 1337 1338 1350 1365 1382 1383 1394 1402 1405 1414 1494 ...
分类:
其他好文 时间:
2014-07-18 10:22:36
阅读次数:
556
/*BFS,注意马脚!马脚WA了一次,后来WA了N次,最后发现输入时候将军和马的位置搞反,更改后AC*/1 #include 2 #include 3 #include 5 using namespace std; 6 const int maxn=10000,maxm=25; 7 int vis....
分类:
其他好文 时间:
2014-07-18 09:29:15
阅读次数:
302
不断向下取直到,忽略的数累计到一个百分比,给当前百分比加1。 这道题要避免处理浮点数,用余数来处理,不然会wa 9 #include #include using namespace std;int g[10001];int x, n, sum, le;int main() { cin >>...
分类:
其他好文 时间:
2014-07-17 23:21:20
阅读次数:
197
假设所有西瓜重 Asum,所求的是用 Asum / 2 的背包装,最多装下多少。刚开始用贪心作的,WA。后来用01背包,结果TLE,数据太大。原来用的是深搜!dfs(int sum, int i) 表示当前装已了 sum,对第 i 个进行决策。用时1200多MS,不知道大牛们60MS是怎么搞的,泥煤...
分类:
其他好文 时间:
2014-07-17 22:36:47
阅读次数:
255
模拟吧,算是。。。被这个题wa到哭,真是什么都不想说了。。。上代码 1 #include 2 #include 3 using namespace std; 4 5 struct node { 6 int x,y; 7 char c; 8 }q[10]; 9 ...
分类:
其他好文 时间:
2014-07-17 22:21:32
阅读次数:
458
Description
There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It wa...
分类:
其他好文 时间:
2014-07-17 10:41:03
阅读次数:
220