Pagini recente » Borderou de evaluare (job #2626886) | Borderou de evaluare (job #2626877) | Borderou de evaluare (job #2426238) | Borderou de evaluare (job #2330252) | Borderou de evaluare (job #3127700)
Borderou de evaluare (job #3127700)
Raport evaluator
Compilare:
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<fstream>
| ^~~~~~
main.cpp:2:77: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | int x[]={-1,0,1,0},l[1<<15],c[1<<15],a[177][177],b,d,o,q,n,m,k,i,j,v,p,u,*P;main(){std::ifstream f("alee.in");for(f>>n>>m;m--;f>>i>>k,a[i][k]=-1);for(f>>b>>d>>o>>q,i=0;i++<n;*a[i]=a[i][n+1]=a[0][i]=a[n+1][i]=-1);for(a[b][d]=1,l[p]=b,c[p]=d;p<=u&!a[o][q];)for(j=l[p],v=c[p++],k=-1;k++<3;P=&a[j+x[k]][v+x[3-k]],!*P?*P=a[j][v]+1,l[++u]=j+x[k],c[u]=v+x[3-k]:0);std::ofstream("alee.out")<<a[o][q];}
| ^~~~
main.cpp: In function 'int main()':
main.cpp:2:242: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
2 | int x[]={-1,0,1,0},l[1<<15],c[1<<15],a[177][177],b,d,o,q,n,m,k,i,j,v,p,u,*P;main(){std::ifstream f("alee.in");for(f>>n>>m;m--;f>>i>>k,a[i][k]=-1);for(f>>b>>d>>o>>q,i=0;i++<n;*a[i]=a[i][n+1]=a[0][i]=a[n+1][i]=-1);for(a[b][d]=1,l[p]=b,c[p]=d;p<=u&!a[o][q];)for(j=l[p],v=c[p++],k=-1;k++<3;P=&a[j+x[k]][v+x[3-k]],!*P?*P=a[j][v]+1,l[++u]=j+x[k],c[u]=v+x[3-k]:0);std::ofstream("alee.out")<<a[o][q];}
| ~^~~
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 0ms | 303kb | OK | 10 |
2 | 0ms | 303kb | OK | 10 |
3 | 0ms | 303kb | OK | 10 |
4 | 0ms | 303kb | OK | 10 |
5 | 0ms | 303kb | OK | 10 |
6 | 1ms | 557kb | OK | 10 |
7 | 1ms | 557kb | OK | 10 |
8 | 0ms | 557kb | OK | 10 |
9 | 0ms | 303kb | OK | 10 |
10 | 0ms | 303kb | OK | 10 |
Punctaj total | 100 |