10 2014 档案
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1001这题是等差求和,不能直接sum=(1+n)*n/2;因为题目只是说结果在32bit之内,但(1+n)*n很可能超出32bit,所以这样写WA。#include #include #include #inclu...
阅读全文
摘要:题目: http://poj.org/problem?id=1236【题意】N(2#include #include #include #include #include #include #define N 1010using namespace std;struct node{ int x...
阅读全文
摘要:题目解析: 这题题意没什么好说的,解法也挺简单的,只要会tarjan算法+只有一个出度为0的强连通分量题目有解这题就迎刃而解了。#include #include #include #include #define N 100002using namespace std;int n,m,tt,tim...
阅读全文
摘要:#include #include #include #include #include #define inf 1000001 using namespace std; struct node { int x,y,c,w; int next; } eg[400001]; int n,m,K,s,t,tt,head[2005],dis[2005],pre[2005],v...
阅读全文
摘要:http://poj.org/problem?id=1175 题目解析: 这个题因为数据的原因可以很水的过,但我因为把1e-8写成了1e-9WA了N遍,一直WA,题目意思很简单就是相似图形(就是求旋转的图形,我不会,但在discuss中看到 可以通过求图形的长度来求)另外常识性问题double数据类
阅读全文
摘要:http://poj.org/problem?id=2506
阅读全文
摘要:http://poj.org/problem?id=2135
阅读全文
摘要:http://poj.org/problem?id=2195
阅读全文
摘要:http://poj.org/problem?id=1273 Description Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means t
阅读全文