摘要:
//(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 阅读全文
摘要:
//特殊数据好坑爹啊- -#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, 阅读全文
摘要:
//如果 剩下的人+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 阅读全文
摘要:
#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)... 阅读全文
摘要:
// 题目数据有问题 这样都能过? 如果没有循环就不行 但是数组也开不了那么大 所以数据或者数据范围有问题#include<bits/stdc++.h> using namespace std; int main(){ int a[10000],x,y,n,m,i; a[1]=a[2]=1; whi 阅读全文