Borderou de evaluare (job #2638647)

Utilizator david.teacaDavid Stefan Teaca david.teaca Data 29 iulie 2020 11:35:36
Problema Joc2 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 100

Raport evaluator

Compilare: main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] #import<stdio.h> ^~~~~~ main.cpp:2:2: warning: #import is a deprecated GCC extension [-Wdeprecated] #import<string.h> ^~~~~~ main.cpp: In function 'void calc_val()': main.cpp:3:127: warning: this 'for' clause does not guard... [-Wmisleading-indentation] int n,a[101][101],m[405],r,s,x,y,v[101][2],i,j,k;void calc_val(){for(i=1;i<=100;i++)for(j=1;j<=100;j++){memset(m,0,sizeof(m));for(k=1;k<j;k++)m[a[i][k]^a[i][j-k]]=1;for(k=1;k<i;k++)m[a[k][j]^a[i-k][j]]=1;for(k=1;k<j-1;k++)m[a[i][k]^a[i][j-k-1]]=1;for(k=1;k<i-1;k++)m[a[k][j]^a[i-k-1][j]]=1;if(i>2&&j>2)m[a[i-2][j-2]]=1;for(k=0;m[k];k++);a[i][j]=k;}}main(){freopen("joc2.in","r",stdin);freopen("joc2.out","w",stdout);calc_val();scanf("%d",&n);for(i=1;i<=n;i++){scanf("%d %d",&v[i][0],&v[i][1]); s=s^a[v[i][0]][v[i][1]];}for(i=1;i<=n;i++){x=s^a[v[i][0]][v[i][1]];for(k=1;k<v[i][1];k++)if((x^a[v[i][0]][k]^a[v[i][0]][v[i][1]-k])==0)r++;for(k=1;k<v[i][0];k++)if((x^a[k][v[i][1]]^a[v[i][0]-k][v[i][1]])==0)r++;for(k=1;k<v[i][1]-1;k++)if((x^a[v[i][0]][k]^a[v[i][0]][v[i][1]-k-1])==0)r++;for(k=1;k<v[i][0]-1;k++)if((x^a[k][v[i][1]]^a[v[i][0]-k-1][v[i][1]])==0)r++;if(v[i][0]>2&&v[i][1]>2)if((x^a[v[i][0]-2][v[i][1]-2])==0) r++;}printf("%d",r);fclose(stdout);} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:4:38: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for' main.cpp:4:120: warning: this 'for' clause does not guard... [-Wmisleading-indentation] main.cpp:5:35: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for' main.cpp: At global scope: main.cpp:5:99: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] main.cpp: In function 'int main()': main.cpp:7:122: warning: this 'for' clause does not guard... [-Wmisleading-indentation] main.cpp:8:66: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for' main.cpp:8:90: warning: this 'if' clause does not guard... [-Wmisleading-indentation] main.cpp:9:14: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' main.cpp:6:1: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] main.cpp:6:32: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result] main.cpp:6:58: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] main.cpp:6:109: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
Test Timp executie Memorie folosita Mesaj Punctaj/test
113ms131kbOK5
213ms131kbOK5
313ms131kbOK5
413ms131kbOK5
513ms131kbOK5
613ms131kbOK5
713ms131kbOK5
813ms131kbOK5
913ms131kbOK5
1013ms131kbOK5
1113ms131kbOK5
1213ms131kbOK5
1313ms131kbOK5
1413ms131kbOK5
1513ms131kbOK5
1613ms131kbOK5
1713ms131kbOK5
1813ms131kbOK5
1913ms131kbOK5
2013ms131kbOK5
Punctaj total100

Ceva nu functioneaza?