摘要: 图论题:一开始我是用tarjan算法做的,wrong answer 了很多次,然后又用了floyd-warshell算法,也wa了最后找了题解,原来最后的dataset后面不是组数,是样例的编号,题根本就没说,让人怎么理解。。。tarjan#include#include#include#inclu... 阅读全文
posted @ 2015-08-17 21:06 袁汉春 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 二进制枚举即可:#include#include#includeusing namespace std;int cmp(int a,int b){ return a > b;} int main(){ int t; scanf("%d",&t); while(t--){ int ans =... 阅读全文
posted @ 2015-08-17 20:00 袁汉春 阅读(379) 评论(0) 推荐(0) 编辑