![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
uva
TommyTT
我擦,要挂科了。
展开
-
UVA 11729 Commando War
根据任务时间从大到小排序,保存当前士兵以后能够和其他人共同进行的时间。求出差的最大值,加上交代每个士兵任务这个必须时间就是答案。 #include #include #include #include using namespace std; struct node{int x,y;}man[1005]; int last[1005]; bool cmp(const node &a,const原创 2013-08-29 10:47:06 · 650 阅读 · 0 评论 -
UVA - 11464 Even Parity
第一行枚举,用二进制思想,后面的n-1行都可以推出来。边推边验证是否满足要求。 保存最优解 #include #include #include #include using namespace std; int a[20][20]; int b[20][20]; int main() { int cas,n; cin>>cas; for(int ca=1;ca原创 2013-09-04 15:18:21 · 729 阅读 · 0 评论