上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 63 下一页
摘要: #include<iostream> using namespace std ; const int N=1100; int f[N],g[N]; int w[N]; int main() { int n; cin>>n; int res=0; for(int i=1; i<=n; i++) cin 阅读全文
posted @ 2019-11-27 21:16 晴屿 阅读(161) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std ; const int N=1100; int f[N],g[N]; int w[N]; int main() { int n; cin>>n; int res=0; for(int i=1; i<=n; i++) cin 阅读全文
posted @ 2019-11-27 21:04 晴屿 阅读(114) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std ; const int N=110; int f[N],g[N]; int w[N]; int main() { int t; cin>>t; while(t--) { int n; cin>>n; int res=0; 阅读全文
posted @ 2019-11-27 21:03 晴屿 阅读(221) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std ; const int N=110; int f[2*N][N][N]; int w[N][N]; int n,m; int main() { cin>>n>>m; for(int i=1; i<=n; i++) for( 阅读全文
posted @ 2019-11-27 21:02 晴屿 阅读(100) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std ; const int N=110,INF=1e9; int dp[N][N],w[N][N]; int n; int main() { cin>>n; for(int i=1; i<=n; i++) for(int j= 阅读全文
posted @ 2019-11-27 10:18 晴屿 阅读(163) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std ; const int N=110; int f[2*N][N][N]; int w[N][N]; int n; int main() { cin>>n; int a,b,c; while(cin>>a>>b>>c,a|| 阅读全文
posted @ 2019-11-27 10:17 晴屿 阅读(275) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> #include <cstring> using namespace std; string a1,b1; int a[100001],b[100001],c[100001],t[100001]; int compare(i 阅读全文
posted @ 2019-11-26 23:33 晴屿 阅读(175) 评论(0) 推荐(0)
摘要: 把每一次输入的一组数字存下来,然后把每个数字出现的组数存下来 然后找只出现过一次的数字a,那么这个数字a不是开头就是结尾,默认为开头(是哪个都无所谓),然后去找和它出现在同一组的两个数字b和c,而b和c同时出现的只有两组,除了已经知道的,就是需要去查找的,然后循环,同时存在的组数,找到两个数字a和b 阅读全文
posted @ 2019-11-26 19:22 晴屿 阅读(219) 评论(0) 推荐(0)
摘要: //题目要求的是每一个点最少要有两条边连接,所以可以先构成一个环。然后再把剩余的最短的边连接起来 #include<iostream> #include<algorithm> using namespace std ; const int N=100010; int n,m; struct edge 阅读全文
posted @ 2019-11-26 00:00 晴屿 阅读(272) 评论(0) 推荐(0)
摘要: 好吧,其实我拿到这个题的时候,首先想到了bfs,写完之后,开开森森的去交代码,却在第二个数据就TEL,然后优化半天,还是不行。 最终,我盯着1,2,5发呆半天,wc,然后直接贪心 #include<iostream> using namespace std; int main() { int T; 阅读全文
posted @ 2019-11-25 22:22 晴屿 阅读(127) 评论(0) 推荐(0)
上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 63 下一页