Pagini recente » Borderou de evaluare (job #1930823) | Borderou de evaluare (job #2934791) | Borderou de evaluare (job #1408057) | Borderou de evaluare (job #965782) | Borderou de evaluare (job #1702961)
Borderou de evaluare (job #1702961)
Raport evaluator
Compilare:
user.cpp: In function ‘int main()’:
user.cpp:2:106: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
int d[100000],n,i,j,l;int main(){FILE*y=fopen("jocul.in","r"),*z=fopen("jocul.out","w");fscanf(y,"%d",&n);d[0]=1;int x=0,s=0;for(i=0;i<n;i++){fscanf(y,"%d",&l);s+=l;for(j=x;j>=0;j--)if(d[j]==1)d[j+l]=1;x=x+l;}i=s/2;while(d[i]==0)i--;fprintf(z,"%d %d",i,s-i);return 0;}
^
user.cpp:2:160: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
int d[100000],n,i,j,l;int main(){FILE*y=fopen("jocul.in","r"),*z=fopen("jocul.out","w");fscanf(y,"%d",&n);d[0]=1;int x=0,s=0;for(i=0;i<n;i++){fscanf(y,"%d",&l);s+=l;for(j=x;j>=0;j--)if(d[j]==1)d[j+l]=1;x=x+l;}i=s/2;while(d[i]==0)i--;fprintf(z,"%d %d",i,s-i);return 0;}
^
| Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
Punctaj/grupa |
| 1 | 0ms | 260kb | OK | 10 | 40 |
| 2 | 0ms | 260kb | OK | 10 |
| 3 | 0ms | 260kb | OK | 10 |
| 4 | 4ms | 324kb | OK | 10 |
| 5 | 16ms | 380kb | OK | 10 | 40 |
| 6 | 0ms | 260kb | OK | 10 |
| 7 | 32ms | 412kb | OK | 10 |
| 8 | 4ms | 328kb | OK | 10 |
| 9 | 0ms | 272kb | OK | 10 | 20 |
| 10 | 44ms | 460kb | OK | 10 |
| Punctaj total | 100 |