제출 #7830

#제출 시각아이디문제언어결과실행 시간메모리
7830ggohCATS (NOI14_cats)C++98
0 / 25
1500 ms1744 KiB
#include<cstdio> int a,i,u,x,l,n,c; main() { scanf("%d",&a); for(u=0;u<a;u++) { scanf("%d%d%d",&x,&l,&n); int s1[100000]={},s2[100000]={},p1=0,p2=0; c=x; while(c) { s2[++p2]=s1[p1]; p1--; for(i=0;i<=p1;i++) { if(s1[i]%2)s1[i]++; else s1[i]--; } if(s2[p2]>l) { c--; if(c==0)printf("%d",s2[p2]); } else { s2[++p2]=n; s2[++p2]=n; s2[p2-1]=s2[p2]+s2[p2-1];p2--; s2[p2-1]=s2[p2]+s2[p2-1];p2--; s1[++p1]=s2[p2]; s1[++p1]=s2[p2]; p2-=2; } } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...