上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 45 下一页
摘要: //(a,b)最小公倍数=a*b/(a,b)最大公因数 //最大公因数用欧几里得定律求(这里不证明)可百度(说实话我好想不会orz)#include<bits/stdc++.h> using namespace std; int gcd(int x,int y){ return y==0?x:gcd 阅读全文
posted @ 2017-06-24 18:45 wqtnb_tql_qwq_%%% 阅读(126) 评论(0) 推荐(0) 编辑
摘要: //特殊数据好坑爹啊- -#include<bits/stdc++.h> using namespace std; int a[2010],n; char s[2010]; bool first; int main(){ while(scanf("%s",&s)!=EOF){ memset(a,0, 阅读全文
posted @ 2017-06-24 18:30 wqtnb_tql_qwq_%%% 阅读(590) 评论(0) 推荐(0) 编辑
摘要: //如果 剩下的人+1 > 最大的人 就是Yes 不然 no#include<cstdio> int q,a[1000010],n,x,maxn; long long sum; bool answer; int main(){ scanf("%d",&q); while(q--){ x=0,maxn 阅读全文
posted @ 2017-06-24 13:35 wqtnb_tql_qwq_%%% 阅读(135) 评论(0) 推荐(0) 编辑
摘要: #include int main(){ int n,a,b,c,sum,i,j; scanf("%d",&n); while(n--){ scanf("%d-%d-%d",&a,&b,&c); sum=0; if(b==2&&c==29){printf("-1\n"); continue;} if(b<=2)... 阅读全文
posted @ 2017-06-24 13:16 wqtnb_tql_qwq_%%% 阅读(95) 评论(0) 推荐(0) 编辑
摘要: // 题目数据有问题 这样都能过? 如果没有循环就不行 但是数组也开不了那么大 所以数据或者数据范围有问题#include<bits/stdc++.h> using namespace std; int main(){ int a[10000],x,y,n,m,i; a[1]=a[2]=1; whi 阅读全文
posted @ 2017-06-24 12:46 wqtnb_tql_qwq_%%% 阅读(113) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; int n,vmax; string x,smax; map<string,int> m; map<string,int>::iterator p; int main(){ while(scanf("%d",& 阅读全文
posted @ 2017-06-23 13:16 wqtnb_tql_qwq_%%% 阅读(115) 评论(0) 推荐(0) 编辑
摘要: //格式最坑的题库- -#include<bits/stdc++.h> using namespace std; int q,f,l,sum,a[100010],maxn,mayf=1; int main(){ scanf("%d",&q); for(int i=1;i<=q;i++){ memse 阅读全文
posted @ 2017-06-23 12:32 wqtnb_tql_qwq_%%% 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Description 已知:Sn= 1+1/2+1/3+…+1/n。显然对于任意一个整数K,当n足够大的时候,Sn大于K。 现给出一个整数K(1<=k<=15),要求计算出一个最小的n;使得Sn>K。 题目描述 Description 已知:Sn= 1+1/2+1/3+…+1/n。显然对 阅读全文
posted @ 2017-06-22 19:16 wqtnb_tql_qwq_%%% 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Description 学校需要将n台计算机连接起来,不同的2台计算机之间的连接费用可能是不同的。为了节省费用,我们考虑采用间接数据传输结束,就是一台计算机可以间接地通过其他计算机实现和另外一台计算机连接。 为了使得任意两台计算机之间都是连通的(不管是直接还是间接的),需要在若干台计算机之 阅读全文
posted @ 2017-06-22 19:01 wqtnb_tql_qwq_%%% 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Description 农民约翰被选为他们镇的镇长!他其中一个竞选承诺就是在镇上建立起互联网,并连接到所有的农场。当然,他需要你的帮助。 约翰已经给他的农场安排了一条高速的网络线路,他想把这条线路共享给其他农场。为了使花费最少,他想铺设最短的光纤去连接所有的农场。 你将得到一份各农场之间连 阅读全文
posted @ 2017-06-22 19:00 wqtnb_tql_qwq_%%% 阅读(261) 评论(0) 推荐(0) 编辑
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 45 下一页