摘要: 题意: 给出质量为1~n的n个箱子的m对轻重关系,输出一种可能的箱子的质量排列。Solution: 拓扑排序,注意要处理重边。#include #include using namespace std;const int N = 209;queue q;bool G[N][N];int deg... 阅读全文
posted @ 2015-05-17 19:55 keambar 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 题意: 从n个数中选若干个数,使它们的异或和最大。nusing namespace std;int n;long long a[109];int main(){ ios::sync_with_stdio(); cin >> n; long long ans = 0; for... 阅读全文
posted @ 2015-05-17 19:10 keambar 阅读(224) 评论(0) 推荐(0) 编辑