Borderou de evaluare (job #2034571)

Utilizator OlivianOlivian Dan Cretu Olivian Data 7 octombrie 2017 23:55:39
Problema Hacker3 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 100

Raport evaluator

Compilare: user.cpp: In function ‘int main()’: user.cpp:3:63: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] using namespace std;int main(){freopen("hacker3.in","r",stdin);freopen("hacker3.out","w",stdout);int n,x,y,ct;scanf("%d",&n);ct=n/3;long long rez;int a[ct+5];int b[ct+5];int k=0;for(int i=1; i<=n; i++){scanf("%d%d",&x,&y);if(i>(2*ct)){k++;a[i-(2*ct)]=x;b[i-(2*ct)]=y;}}rez=min(a[k],b[k]);for(int i=k-1; i>=1; i--) rez=min(rez+b[i],2*rez+a[i]);b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1; i<=(2*ct); i++){scanf("%d%d",&x,&y);if(i>ct){a[i-ct]=x;b[i-ct]=y;}}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1;i<=ct;i++){scanf("%d%d",&a[i],&b[i]);}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}printf("%lld",rez);} ^ user.cpp:3:97: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] using namespace std;int main(){freopen("hacker3.in","r",stdin);freopen("hacker3.out","w",stdout);int n,x,y,ct;scanf("%d",&n);ct=n/3;long long rez;int a[ct+5];int b[ct+5];int k=0;for(int i=1; i<=n; i++){scanf("%d%d",&x,&y);if(i>(2*ct)){k++;a[i-(2*ct)]=x;b[i-(2*ct)]=y;}}rez=min(a[k],b[k]);for(int i=k-1; i>=1; i--) rez=min(rez+b[i],2*rez+a[i]);b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1; i<=(2*ct); i++){scanf("%d%d",&x,&y);if(i>ct){a[i-ct]=x;b[i-ct]=y;}}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1;i<=ct;i++){scanf("%d%d",&a[i],&b[i]);}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}printf("%lld",rez);} ^ user.cpp:3:125: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] using namespace std;int main(){freopen("hacker3.in","r",stdin);freopen("hacker3.out","w",stdout);int n,x,y,ct;scanf("%d",&n);ct=n/3;long long rez;int a[ct+5];int b[ct+5];int k=0;for(int i=1; i<=n; i++){scanf("%d%d",&x,&y);if(i>(2*ct)){k++;a[i-(2*ct)]=x;b[i-(2*ct)]=y;}}rez=min(a[k],b[k]);for(int i=k-1; i>=1; i--) rez=min(rez+b[i],2*rez+a[i]);b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1; i<=(2*ct); i++){scanf("%d%d",&x,&y);if(i>ct){a[i-ct]=x;b[i-ct]=y;}}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1;i<=ct;i++){scanf("%d%d",&a[i],&b[i]);}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}printf("%lld",rez);} ^ user.cpp:3:222: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] using namespace std;int main(){freopen("hacker3.in","r",stdin);freopen("hacker3.out","w",stdout);int n,x,y,ct;scanf("%d",&n);ct=n/3;long long rez;int a[ct+5];int b[ct+5];int k=0;for(int i=1; i<=n; i++){scanf("%d%d",&x,&y);if(i>(2*ct)){k++;a[i-(2*ct)]=x;b[i-(2*ct)]=y;}}rez=min(a[k],b[k]);for(int i=k-1; i>=1; i--) rez=min(rez+b[i],2*rez+a[i]);b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1; i<=(2*ct); i++){scanf("%d%d",&x,&y);if(i>ct){a[i-ct]=x;b[i-ct]=y;}}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1;i<=ct;i++){scanf("%d%d",&a[i],&b[i]);}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}printf("%lld",rez);} ^ user.cpp:3:401: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] using namespace std;int main(){freopen("hacker3.in","r",stdin);freopen("hacker3.out","w",stdout);int n,x,y,ct;scanf("%d",&n);ct=n/3;long long rez;int a[ct+5];int b[ct+5];int k=0;for(int i=1; i<=n; i++){scanf("%d%d",&x,&y);if(i>(2*ct)){k++;a[i-(2*ct)]=x;b[i-(2*ct)]=y;}}rez=min(a[k],b[k]);for(int i=k-1; i>=1; i--) rez=min(rez+b[i],2*rez+a[i]);b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1; i<=(2*ct); i++){scanf("%d%d",&x,&y);if(i>ct){a[i-ct]=x;b[i-ct]=y;}}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1;i<=ct;i++){scanf("%d%d",&a[i],&b[i]);}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}printf("%lld",rez);} ^ user.cpp:3:416: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] using namespace std;int main(){freopen("hacker3.in","r",stdin);freopen("hacker3.out","w",stdout);int n,x,y,ct;scanf("%d",&n);ct=n/3;long long rez;int a[ct+5];int b[ct+5];int k=0;for(int i=1; i<=n; i++){scanf("%d%d",&x,&y);if(i>(2*ct)){k++;a[i-(2*ct)]=x;b[i-(2*ct)]=y;}}rez=min(a[k],b[k]);for(int i=k-1; i>=1; i--) rez=min(rez+b[i],2*rez+a[i]);b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1; i<=(2*ct); i++){scanf("%d%d",&x,&y);if(i>ct){a[i-ct]=x;b[i-ct]=y;}}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1;i<=ct;i++){scanf("%d%d",&a[i],&b[i]);}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}printf("%lld",rez);} ^ user.cpp:3:465: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] using namespace std;int main(){freopen("hacker3.in","r",stdin);freopen("hacker3.out","w",stdout);int n,x,y,ct;scanf("%d",&n);ct=n/3;long long rez;int a[ct+5];int b[ct+5];int k=0;for(int i=1; i<=n; i++){scanf("%d%d",&x,&y);if(i>(2*ct)){k++;a[i-(2*ct)]=x;b[i-(2*ct)]=y;}}rez=min(a[k],b[k]);for(int i=k-1; i>=1; i--) rez=min(rez+b[i],2*rez+a[i]);b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1; i<=(2*ct); i++){scanf("%d%d",&x,&y);if(i>ct){a[i-ct]=x;b[i-ct]=y;}}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1;i<=ct;i++){scanf("%d%d",&a[i],&b[i]);}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}printf("%lld",rez);} ^ user.cpp:3:607: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] using namespace std;int main(){freopen("hacker3.in","r",stdin);freopen("hacker3.out","w",stdout);int n,x,y,ct;scanf("%d",&n);ct=n/3;long long rez;int a[ct+5];int b[ct+5];int k=0;for(int i=1; i<=n; i++){scanf("%d%d",&x,&y);if(i>(2*ct)){k++;a[i-(2*ct)]=x;b[i-(2*ct)]=y;}}rez=min(a[k],b[k]);for(int i=k-1; i>=1; i--) rez=min(rez+b[i],2*rez+a[i]);b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1; i<=(2*ct); i++){scanf("%d%d",&x,&y);if(i>ct){a[i-ct]=x;b[i-ct]=y;}}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1;i<=ct;i++){scanf("%d%d",&a[i],&b[i]);}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}printf("%lld",rez);} ^ user.cpp:3:622: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] using namespace std;int main(){freopen("hacker3.in","r",stdin);freopen("hacker3.out","w",stdout);int n,x,y,ct;scanf("%d",&n);ct=n/3;long long rez;int a[ct+5];int b[ct+5];int k=0;for(int i=1; i<=n; i++){scanf("%d%d",&x,&y);if(i>(2*ct)){k++;a[i-(2*ct)]=x;b[i-(2*ct)]=y;}}rez=min(a[k],b[k]);for(int i=k-1; i>=1; i--) rez=min(rez+b[i],2*rez+a[i]);b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1; i<=(2*ct); i++){scanf("%d%d",&x,&y);if(i>ct){a[i-ct]=x;b[i-ct]=y;}}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1;i<=ct;i++){scanf("%d%d",&a[i],&b[i]);}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}printf("%lld",rez);} ^ user.cpp:3:671: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] using namespace std;int main(){freopen("hacker3.in","r",stdin);freopen("hacker3.out","w",stdout);int n,x,y,ct;scanf("%d",&n);ct=n/3;long long rez;int a[ct+5];int b[ct+5];int k=0;for(int i=1; i<=n; i++){scanf("%d%d",&x,&y);if(i>(2*ct)){k++;a[i-(2*ct)]=x;b[i-(2*ct)]=y;}}rez=min(a[k],b[k]);for(int i=k-1; i>=1; i--) rez=min(rez+b[i],2*rez+a[i]);b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1; i<=(2*ct); i++){scanf("%d%d",&x,&y);if(i>ct){a[i-ct]=x;b[i-ct]=y;}}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}b[ct+1]=rez;fclose(stdin);freopen("hacker3.in","r",stdin);scanf("%d",&n);for(int i=1;i<=ct;i++){scanf("%d%d",&a[i],&b[i]);}for(int i=ct;i>=1;i--){rez=min(rez+b[i],2*rez+a[i]);}printf("%lld",rez);} ^
Test Timp executie Memorie folosita Mesaj Punctaj/test Punctaj/grupa
10ms268kbOK55
20ms260kbOK55
30ms264kbOK55
40ms268kbOK55
50ms268kbOK55
60ms268kbOK55
70ms272kbOK55
80ms268kbOK55
94ms292kbOK530
104ms288kbOK5
114ms292kbOK5
124ms292kbOK5
134ms292kbOK5
144ms288kbOK5
1560ms528kbOK530
1660ms520kbOK5
1764ms528kbOK5
1864ms524kbOK5
1960ms524kbOK5
2096ms524kbOK5
Punctaj total100

Ceva nu functioneaza?