Borderou de evaluare (job #3172041)

Utilizator AlexCroitoriuAlex Croitoriu AlexCroitoriu Data 19 noiembrie 2023 22:14:36
Problema Concurs Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 100

Raport evaluator

Compilare: main.cpp: In function 'I k(I, I)': main.cpp:4:203: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] 4 | using I=int;using namespace std;ifstream f("concurs.in");const I h=4e4;I p[h],a[h],b[h],t[h][16],n,m,x,y,r,c,d,q,s,u,i=0,j=0;set<I>e[h];void z(I x){a[x]=++d;W(I y:e[x])z(y);b[x]=++d;}I k(I x,I y){L a[x]<=a[y]&b[y]<=b[x];}I o(I x,I y){if(k(x,y))L x;if(k(y,x))L y;W(i=15;i-->=0;)k(t[x][i],y)?:x=t[x][i];L t[x][0];}main(){f>>n>>m;W(;++i<=n;)f>>p[i];W(i=n;--i>0;)f>>x>>y,t[y][0]=x,e[x].insert(y);W(;++i<=n;)r|=!t[i][0]*i;W(;++j<16;)W(i=0;++i<=n;)t[i][j]=t[t[i][j-1]][j-1]|=!t[i][j-1]*r;z(r);W(;m--;){f>>x>>y;c=p[o(x,y)];if(q<c|q==c&(x<s|x==s&y<u))q=c,s=x,u=y;}ofstream("concurs.out")<<q<<' '<<s<<' '<<u;} | ~~~~^~~~~~ main.cpp: At global scope: main.cpp:4:313: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | using I=int;using namespace std;ifstream f("concurs.in");const I h=4e4;I p[h],a[h],b[h],t[h][16],n,m,x,y,r,c,d,q,s,u,i=0,j=0;set<I>e[h];void z(I x){a[x]=++d;W(I y:e[x])z(y);b[x]=++d;}I k(I x,I y){L a[x]<=a[y]&b[y]<=b[x];}I o(I x,I y){if(k(x,y))L x;if(k(y,x))L y;W(i=15;i-->=0;)k(t[x][i],y)?:x=t[x][i];L t[x][0];}main(){f>>n>>m;W(;++i<=n;)f>>p[i];W(i=n;--i>0;)f>>x>>y,t[y][0]=x,e[x].insert(y);W(;++i<=n;)r|=!t[i][0]*i;W(;++j<16;)W(i=0;++i<=n;)t[i][j]=t[t[i][j-1]][j-1]|=!t[i][j-1]*r;z(r);W(;m--;){f>>x>>y;c=p[o(x,y)];if(q<c|q==c&(x<s|x==s&y<u))q=c,s=x,u=y;}ofstream("concurs.out")<<q<<' '<<s<<' '<<u;} | ^~~~ main.cpp: In function 'int main()': main.cpp:4:535: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] 4 | using I=int;using namespace std;ifstream f("concurs.in");const I h=4e4;I p[h],a[h],b[h],t[h][16],n,m,x,y,r,c,d,q,s,u,i=0,j=0;set<I>e[h];void z(I x){a[x]=++d;W(I y:e[x])z(y);b[x]=++d;}I k(I x,I y){L a[x]<=a[y]&b[y]<=b[x];}I o(I x,I y){if(k(x,y))L x;if(k(y,x))L y;W(i=15;i-->=0;)k(t[x][i],y)?:x=t[x][i];L t[x][0];}main(){f>>n>>m;W(;++i<=n;)f>>p[i];W(i=n;--i>0;)f>>x>>y,t[y][0]=x,e[x].insert(y);W(;++i<=n;)r|=!t[i][0]*i;W(;++j<16;)W(i=0;++i<=n;)t[i][j]=t[t[i][j-1]][j-1]|=!t[i][j-1]*r;z(r);W(;m--;){f>>x>>y;c=p[o(x,y)];if(q<c|q==c&(x<s|x==s&y<u))q=c,s=x,u=y;}ofstream("concurs.out")<<q<<' '<<s<<' '<<u;} | ~^~~ main.cpp:4:538: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses] 4 | using I=int;using namespace std;ifstream f("concurs.in");const I h=4e4;I p[h],a[h],b[h],t[h][16],n,m,x,y,r,c,d,q,s,u,i=0,j=0;set<I>e[h];void z(I x){a[x]=++d;W(I y:e[x])z(y);b[x]=++d;}I k(I x,I y){L a[x]<=a[y]&b[y]<=b[x];}I o(I x,I y){if(k(x,y))L x;if(k(y,x))L y;W(i=15;i-->=0;)k(t[x][i],y)?:x=t[x][i];L t[x][0];}main(){f>>n>>m;W(;++i<=n;)f>>p[i];W(i=n;--i>0;)f>>x>>y,t[y][0]=x,e[x].insert(y);W(;++i<=n;)r|=!t[i][0]*i;W(;++j<16;)W(i=0;++i<=n;)t[i][j]=t[t[i][j-1]][j-1]|=!t[i][j-1]*r;z(r);W(;m--;){f>>x>>y;c=p[o(x,y)];if(q<c|q==c&(x<s|x==s&y<u))q=c,s=x,u=y;}ofstream("concurs.out")<<q<<' '<<s<<' '<<u;} | ~~~~^~~~ main.cpp:4:525: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] 4 | using I=int;using namespace std;ifstream f("concurs.in");const I h=4e4;I p[h],a[h],b[h],t[h][16],n,m,x,y,r,c,d,q,s,u,i=0,j=0;set<I>e[h];void z(I x){a[x]=++d;W(I y:e[x])z(y);b[x]=++d;}I k(I x,I y){L a[x]<=a[y]&b[y]<=b[x];}I o(I x,I y){if(k(x,y))L x;if(k(y,x))L y;W(i=15;i-->=0;)k(t[x][i],y)?:x=t[x][i];L t[x][0];}main(){f>>n>>m;W(;++i<=n;)f>>p[i];W(i=n;--i>0;)f>>x>>y,t[y][0]=x,e[x].insert(y);W(;++i<=n;)r|=!t[i][0]*i;W(;++j<16;)W(i=0;++i<=n;)t[i][j]=t[t[i][j-1]][j-1]|=!t[i][j-1]*r;z(r);W(;m--;){f>>x>>y;c=p[o(x,y)];if(q<c|q==c&(x<s|x==s&y<u))q=c,s=x,u=y;}ofstream("concurs.out")<<q<<' '<<s<<' '<<u;} | ~^~~ main.cpp:4:528: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses] 4 | using I=int;using namespace std;ifstream f("concurs.in");const I h=4e4;I p[h],a[h],b[h],t[h][16],n,m,x,y,r,c,d,q,s,u,i=0,j=0;set<I>e[h];void z(I x){a[x]=++d;W(I y:e[x])z(y);b[x]=++d;}I k(I x,I y){L a[x]<=a[y]&b[y]<=b[x];}I o(I x,I y){if(k(x,y))L x;if(k(y,x))L y;W(i=15;i-->=0;)k(t[x][i],y)?:x=t[x][i];L t[x][0];}main(){f>>n>>m;W(;++i<=n;)f>>p[i];W(i=n;--i>0;)f>>x>>y,t[y][0]=x,e[x].insert(y);W(;++i<=n;)r|=!t[i][0]*i;W(;++j<16;)W(i=0;++i<=n;)t[i][j]=t[t[i][j-1]][j-1]|=!t[i][j-1]*r;z(r);W(;m--;){f>>x>>y;c=p[o(x,y)];if(q<c|q==c&(x<s|x==s&y<u))q=c,s=x,u=y;}ofstream("concurs.out")<<q<<' '<<s<<' '<<u;} | ~~~~^~~~~~~~~~~~~~~
Test Timp executie Memorie folosita Mesaj Punctaj/test
11ms2129kbOK10
21ms2129kbOK10
31ms2392kbOK10
42ms2654kbOK10
52ms2654kbOK10
65ms3440kbOK10
739ms6848kbOK10
88ms4751kbOK10
949ms5914kbOK10
1069ms6062kbOK10
Punctaj total100

Ceva nu functioneaza?