随笔分类 - 水题2
摘要:#include<iostream> #include<algorithm> using namespace std; struct node{ int v,b; }nd[25]; int cmp(node nd1,node nd2){ if(nd1.v>nd2.v)return 1; return
阅读全文
摘要:#include<iostream> #include<algorithm> #include<cstring> using namespace std; int main(){ char data[55]; while(scanf("%s",data)==1&&strcmp(data,"#")){
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; int main(){ int data[150]; int t,n,cnt,i,j,p,pos; scanf("%d",&t); while(t--){ scanf("%d",&n)
阅读全文
摘要:#include<iostream> #include<cmath> #include<cstring> using namespace std; int main(){ char a[80],d[]={'/','\\','.','|','_'}; int len; double sum; whil
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; int main(){ char a[260],key[20],*p,old; int i; while(scanf("%s",a)==1){ while(scanf("%s",key
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; int m,n,num; bool visit[100][100]; char data[100][100],ch; void dfs(int direction,int i,int
阅读全文
摘要:#include<iostream> #include<cstring> #include<algorithm> using namespace std; int main(){ int i,n,len[105],minLen; char a[105][105]; while(scanf("%d",
阅读全文
摘要:#include<iostream> using namespace std; int main(){ int a,b,c,d; scanf("%d%d%d%d",&a,&b,&c,&d); printf("5*(5-(1/5))\n"); return 0; }
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; int data[105][205],a[3],len[105]; void Plus(int i){ int k,l; for(k=i-3;k<i;k++){ for(l=0;l<l
阅读全文
摘要:#include<iostream> using namespace std; int main(){ int a,b,c,d,fenmu,fenzi; char opt; while(scanf("%d/%d%c%d/%d",&a,&b,&opt,&c,&d)==5){ fenmu = b*d;
阅读全文
摘要:#include<iostream> #include<algorithm> using namespace std; int main(){ int t,n,data[1005],m,result,tmp1,tmp2; scanf("%d",&t); while(t--){ scanf("%d",
阅读全文
摘要:#include<iostream> #include<algorithm> #include<cstring> using namespace std; int main(){ char a[205]; scanf("%s",a); int len = strlen(a); sort(a,a+le
阅读全文
摘要:#include<iostream> #include<algorithm> using namespace std; int cmp(long long p,long long q){ if(p>q)return true; return false; } int main(){ int n,i,
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; char ch[15][15]; int data[15][15],hasExit,hasLoop; int r,c,colNum,exitStep,loopStep; int mai
阅读全文
摘要:#include<iostream> #include<cmath> using namespace std; int main(){ double n,p,k; while(scanf("%lf%lf",&n,&p)==2){ k = pow(p,1.0/n); printf("%.0lf\n",
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; int main(){ int s,cnt,tmp,col; char data[10]; char ch[25][130]; while(scanf("%d%s",&s,data)=
阅读全文
摘要:#include<iostream> #include<cstring> #include<algorithm> using namespace std; int cnt; struct node{ char data[15]; int len; }Node[10]; bool decode(){
阅读全文
摘要:#include<iostream> #include<algorithm> using namespace std; struct node{ int ID,a,b; }Node[50005]; bool cmp(node n1,node n2){ if(n1.a>n2.a)return true
阅读全文
摘要:#include<iostream> #include<algorithm> using namespace std; int main(){ int n,s,result,data[20005]; scanf("%d%d",&n,&s); for(int i=0;i<n;i++){ scanf("
阅读全文
摘要:#include<iostream> #include<algorithm> using namespace std; int main(){ int t,n,sum,data[20005]; scanf("%d",&t); while(t--){ scanf("%d",&n); for(int i
阅读全文