Pagini recente » Borderou de evaluare (job #69568) | Borderou de evaluare (job #1985920) | Borderou de evaluare (job #138588) | Borderou de evaluare (job #3286888) | Borderou de evaluare (job #2604319)
Borderou de evaluare (job #2604319)
Raport evaluator
Compilare:
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
#import<stdio.h>
^~~~~~
main.cpp:2:40: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
long long t=0,n,v,r=1,A[100000],q;main(){freopen("timp.in","r",stdin);freopen("timp.out","w",stdout);scanf("%lld %lld",&n,&v);while(v){if(v>n/2)A[r++]=0,v=n-v;else A[r++]=1,t++,v<<=1;}r--;printf("%lld\n",t);q=0;for(r;r;q^=1,r--)if(A[r])printf("%lld\n",q);}
^
main.cpp: In function 'int main()':
main.cpp:2:217: warning: statement has no effect [-Wunused-value]
long long t=0,n,v,r=1,A[100000],q;main(){freopen("timp.in","r",stdin);freopen("timp.out","w",stdout);scanf("%lld %lld",&n,&v);while(v){if(v>n/2)A[r++]=0,v=n-v;else A[r++]=1,t++,v<<=1;}r--;printf("%lld\n",t);q=0;for(r;r;q^=1,r--)if(A[r])printf("%lld\n",q);}
^
main.cpp:2:70: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
long long t=0,n,v,r=1,A[100000],q;main(){freopen("timp.in","r",stdin);freopen("timp.out","w",stdout);scanf("%lld %lld",&n,&v);while(v){if(v>n/2)A[r++]=0,v=n-v;else A[r++]=1,t++,v<<=1;}r--;printf("%lld\n",t);q=0;for(r;r;q^=1,r--)if(A[r])printf("%lld\n",q);}
^
main.cpp:2:101: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
long long t=0,n,v,r=1,A[100000],q;main(){freopen("timp.in","r",stdin);freopen("timp.out","w",stdout);scanf("%lld %lld",&n,&v);while(v){if(v>n/2)A[r++]=0,v=n-v;else A[r++]=1,t++,v<<=1;}r--;printf("%lld\n",t);q=0;for(r;r;q^=1,r--)if(A[r])printf("%lld\n",q);}
^
main.cpp:2:126: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
long long t=0,n,v,r=1,A[100000],q;main(){freopen("timp.in","r",stdin);freopen("timp.out","w",stdout);scanf("%lld %lld",&n,&v);while(v){if(v>n/2)A[r++]=0,v=n-v;else A[r++]=1,t++,v<<=1;}r--;printf("%lld\n",t);q=0;for(r;r;q^=1,r--)if(A[r])printf("%lld\n",q);}
^
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 2ms | 131kb | OK!!! | 10 |
2 | 2ms | 131kb | OK!!! | 10 |
3 | 2ms | 131kb | OK!!! | 10 |
4 | 2ms | 131kb | OK!!! | 10 |
5 | 2ms | 131kb | OK!!! | 10 |
6 | 2ms | 131kb | OK!!! | 10 |
7 | 2ms | 131kb | OK!!! | 10 |
8 | 2ms | 131kb | OK!!! | 10 |
9 | 2ms | 131kb | OK!!! | 10 |
10 | 2ms | 131kb | OK!!! | 10 |
Punctaj total | 100 |