水题,注意数据范围即可#include #include #include using
namespace std;typedef pair Point;int main(){ int x,y; cin >> x >>y;
Point a,b; if((x>0 && y > ...
分类:
其他好文 时间:
2014-06-16 10:47:47
阅读次数:
226
水题#include #include #include using namespace std;int main(){ vector a(4); cin >> a[0] >> a[1]>>a[2]>>a[3]; string str; cin >> str; int res = 0; for(in...
分类:
其他好文 时间:
2014-06-14 23:00:14
阅读次数:
249
模拟即可#include #include #include using namespace std;int main(){ vector a(5); for(int i = 0; i > g[i][j]; } } int maxHappiness = 0; ...
分类:
其他好文 时间:
2014-06-14 22:57:10
阅读次数:
207
看到题目的时候,以为类似插入排序,比较第i个元素和第i-1个元素,如果第i个元素比第i-1个元素小,则不交换如果第i个元素比第i-1个元素大,则交换第i个元素和第i-1个元素 继续比较第i-1个元素与前一个元素,直到前一个元素大为止交换元素次大于等于k则停止但对测试用例1234 3则出现问题,如果....
分类:
其他好文 时间:
2014-06-14 21:46:18
阅读次数:
191
水到家了#include #include #include using namespace std;struct Point{ int index, pos; Point(int index_ = 0, int pos_ = 0){ index = index_; ...
分类:
其他好文 时间:
2014-06-14 21:21:40
阅读次数:
281
It seems like the year of 2013 came only yesterday. Do you know a curious fact? The year of 2013 is the first year after the old 1987 with only distin...
分类:
其他好文 时间:
2014-06-14 19:10:14
阅读次数:
232
screen 尺寸为a:bvideo 尺寸为 c:d如果a == c 则 面积比为
cd/ab=ad/cb (ad c/d,则ad/bd > cb/db 则(ad > cb) screen尺寸可为 ad:bd, video的尺寸可为
cb:db 面积比为:cb*db/ad*bd = cb/ad...
分类:
其他好文 时间:
2014-06-13 17:11:40
阅读次数:
236
注意此题,每一个部分都有一个能量值v[i],他移除第i部分所需的能量是v[f[1]]+v[f[2]]+...+v[f[k]],其中f[1],f[2],...,f[k]是与i直接相连(且还未被移除)的部分的编号。注意题目移除的都是与第i部分直接相连的部分的能量值,将本题目简化得,只考虑两个点1和2,1...
分类:
其他好文 时间:
2014-06-10 16:57:04
阅读次数:
187
水题#include #include #include using namespace
std;int main(){ int n,m; cin >> n >> m; int cnt = 0, sum = 0;
for(int i = 0 ; i > a; i...
分类:
其他好文 时间:
2014-06-10 16:38:18
阅读次数:
226