Borderou de evaluare (job #3127736)

Utilizator arckerDolteanu Gabriel arcker Data 7 mai 2023 19:24:04
Problema Castel3 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Compilare: main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<fstream> | ^~~~~~ main.cpp: In function 'int m(int, int)': main.cpp:2:114: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] 2 | int H[108][108],M[108][108],A,T,Y,p,i,j,n,N,X,Z=1,W=1,L=2,P=2,Q;int m(int i,int j){A++;M[i][j]=1;((H[i][j]>>2)&1)<1&M[i][j+1]<1&&m(i,j+1);((H[i][j]>>1)&1)<1&M[i+1][j]<1&&m(i+1,j);Q=H[i][j];Q==6||Q==7||Q==14||Q==15?T=i,Y=j:0;}main(){std::ifstream f("castel3.in");std::ofstream g("castel3.out");for(f>>p>>n;++i<=n;)for(j=0;++j<=n;f>>H[i][j]);for(i=0;++i<=n;)for(j=0;++j<=n;Q=H[i][j],Q==9||Q==11||Q==13||Q==15?++N,A=0,m(i,j),X<A?X=A,Z=i,W=j,L=T,P=Y:0:0);p<2?g<<N:p<3?g<<X:g<<Z<<' '<<W<<' '<<L<<' '<<P;} | ~~~~~~~~~~~~~~~~^~ main.cpp:2:155: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] 2 | int H[108][108],M[108][108],A,T,Y,p,i,j,n,N,X,Z=1,W=1,L=2,P=2,Q;int m(int i,int j){A++;M[i][j]=1;((H[i][j]>>2)&1)<1&M[i][j+1]<1&&m(i,j+1);((H[i][j]>>1)&1)<1&M[i+1][j]<1&&m(i+1,j);Q=H[i][j];Q==6||Q==7||Q==14||Q==15?T=i,Y=j:0;}main(){std::ifstream f("castel3.in");std::ofstream g("castel3.out");for(f>>p>>n;++i<=n;)for(j=0;++j<=n;f>>H[i][j]);for(i=0;++i<=n;)for(j=0;++j<=n;Q=H[i][j],Q==9||Q==11||Q==13||Q==15?++N,A=0,m(i,j),X<A?X=A,Z=i,W=j,L=T,P=Y:0:0);p<2?g<<N:p<3?g<<X:g<<Z<<' '<<W<<' '<<L<<' '<<P;} | ~~~~~~~~~~~~~~~~^~ main.cpp:2:225: warning: no return statement in function returning non-void [-Wreturn-type] 2 | int H[108][108],M[108][108],A,T,Y,p,i,j,n,N,X,Z=1,W=1,L=2,P=2,Q;int m(int i,int j){A++;M[i][j]=1;((H[i][j]>>2)&1)<1&M[i][j+1]<1&&m(i,j+1);((H[i][j]>>1)&1)<1&M[i+1][j]<1&&m(i+1,j);Q=H[i][j];Q==6||Q==7||Q==14||Q==15?T=i,Y=j:0;}main(){std::ifstream f("castel3.in");std::ofstream g("castel3.out");for(f>>p>>n;++i<=n;)for(j=0;++j<=n;f>>H[i][j]);for(i=0;++i<=n;)for(j=0;++j<=n;Q=H[i][j],Q==9||Q==11||Q==13||Q==15?++N,A=0,m(i,j),X<A?X=A,Z=i,W=j,L=T,P=Y:0:0);p<2?g<<N:p<3?g<<X:g<<Z<<' '<<W<<' '<<L<<' '<<P;} | ^ main.cpp: At global scope: main.cpp:2:226: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | int H[108][108],M[108][108],A,T,Y,p,i,j,n,N,X,Z=1,W=1,L=2,P=2,Q;int m(int i,int j){A++;M[i][j]=1;((H[i][j]>>2)&1)<1&M[i][j+1]<1&&m(i,j+1);((H[i][j]>>1)&1)<1&M[i+1][j]<1&&m(i+1,j);Q=H[i][j];Q==6||Q==7||Q==14||Q==15?T=i,Y=j:0;}main(){std::ifstream f("castel3.in");std::ofstream g("castel3.out");for(f>>p>>n;++i<=n;)for(j=0;++j<=n;f>>H[i][j]);for(i=0;++i<=n;)for(j=0;++j<=n;Q=H[i][j],Q==9||Q==11||Q==13||Q==15?++N,A=0,m(i,j),X<A?X=A,Z=i,W=j,L=T,P=Y:0:0);p<2?g<<N:p<3?g<<X:g<<Z<<' '<<W<<' '<<L<<' '<<P;} | ^~~~ main.cpp: In function 'int m(int, int)': main.cpp:2:69: warning: infinite recursion detected [-Winfinite-recursion] 2 | int H[108][108],M[108][108],A,T,Y,p,i,j,n,N,X,Z=1,W=1,L=2,P=2,Q;int m(int i,int j){A++;M[i][j]=1;((H[i][j]>>2)&1)<1&M[i][j+1]<1&&m(i,j+1);((H[i][j]>>1)&1)<1&M[i+1][j]<1&&m(i+1,j);Q=H[i][j];Q==6||Q==7||Q==14||Q==15?T=i,Y=j:0;}main(){std::ifstream f("castel3.in");std::ofstream g("castel3.out");for(f>>p>>n;++i<=n;)for(j=0;++j<=n;f>>H[i][j]);for(i=0;++i<=n;)for(j=0;++j<=n;Q=H[i][j],Q==9||Q==11||Q==13||Q==15?++N,A=0,m(i,j),X<A?X=A,Z=i,W=j,L=T,P=Y:0:0);p<2?g<<N:p<3?g<<X:g<<Z<<' '<<W<<' '<<L<<' '<<P;} | ^ main.cpp:2:131: note: recursive call 2 | int H[108][108],M[108][108],A,T,Y,p,i,j,n,N,X,Z=1,W=1,L=2,P=2,Q;int m(int i,int j){A++;M[i][j]=1;((H[i][j]>>2)&1)<1&M[i][j+1]<1&&m(i,j+1);((H[i][j]>>1)&1)<1&M[i+1][j]<1&&m(i+1,j);Q=H[i][j];Q==6||Q==7||Q==14||Q==15?T=i,Y=j:0;}main(){std::ifstream f("castel3.in");std::ofstream g("castel3.out");for(f>>p>>n;++i<=n;)for(j=0;++j<=n;f>>H[i][j]);for(i=0;++i<=n;)for(j=0;++j<=n;Q=H[i][j],Q==9||Q==11||Q==13||Q==15?++N,A=0,m(i,j),X<A?X=A,Z=i,W=j,L=T,P=Y:0:0);p<2?g<<N:p<3?g<<X:g<<Z<<' '<<W<<' '<<L<<' '<<P;} | ~^~~~~~~ main.cpp:2:172: note: recursive call 2 | int H[108][108],M[108][108],A,T,Y,p,i,j,n,N,X,Z=1,W=1,L=2,P=2,Q;int m(int i,int j){A++;M[i][j]=1;((H[i][j]>>2)&1)<1&M[i][j+1]<1&&m(i,j+1);((H[i][j]>>1)&1)<1&M[i+1][j]<1&&m(i+1,j);Q=H[i][j];Q==6||Q==7||Q==14||Q==15?T=i,Y=j:0;}main(){std::ifstream f("castel3.in");std::ofstream g("castel3.out");for(f>>p>>n;++i<=n;)for(j=0;++j<=n;f>>H[i][j]);for(i=0;++i<=n;)for(j=0;++j<=n;Q=H[i][j],Q==9||Q==11||Q==13||Q==15?++N,A=0,m(i,j),X<A?X=A,Z=i,W=j,L=T,P=Y:0:0);p<2?g<<N:p<3?g<<X:g<<Z<<' '<<W<<' '<<L<<' '<<P;} | ~^~~~~~~
Test Timp executie Memorie folosita Mesaj Punctaj/test
110ms491kbKilled by Signal 110
210ms483kbKilled by Signal 110
310ms487kbKilled by Signal 110
410ms487kbKilled by Signal 110
510ms507kbKilled by Signal 110
610ms512kbKilled by Signal 110
710ms528kbKilled by Signal 110
810ms512kbKilled by Signal 110
910ms512kbKilled by Signal 110
1010ms520kbKilled by Signal 110
111ms520kbKilled by Signal 110
121ms483kbKilled by Signal 110
131ms491kbKilled by Signal 110
141ms499kbKilled by Signal 110
151ms512kbKilled by Signal 110
161ms503kbKilled by Signal 110
171ms516kbKilled by Signal 110
1812ms520kbKilled by Signal 110
1910ms524kbKilled by Signal 110
2010ms524kbKilled by Signal 110
2110ms573kbKilled by Signal 110
Punctaj total0

Ceva nu functioneaza?