Borderou de evaluare (job #3036852)

Utilizator AlexCroitoriuAlex Croitoriu AlexCroitoriu Data 25 martie 2023 10:49:54
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:122:230: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] 122 | using I=int;using namespace std;InParser f("concurs.in");OutParser g("concurs.out");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=1,j=1;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;i--)if(!k(t[x][i],y))x=t[x][i];L t[x][0];}main(){f>>n>>m;W(;i<=n;i++)f>>p[i];W(i=1;i<n;i++)f>>x>>y,t[y][0]=x,e[x].insert(y);W(i=1;i<=n;i++)r|=!t[i][0]*i;W(;j<16;j++)W(i=1;i<=n;i++){I&G=t[i][j];G=t[t[i][j-1]][j-1],G|=!G*r;}z(r);W(;m--;){f>>x>>y;c=p[o(x,y)];if(q<c|q==c&x<s|q==c&x==s&y<u)q=c,s=x,u=y;}g<<q<<' '<<s<<' '<<u;} | ~~~~^~~~~~ main.cpp: At global scope: main.cpp:122:344: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 122 | using I=int;using namespace std;InParser f("concurs.in");OutParser g("concurs.out");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=1,j=1;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;i--)if(!k(t[x][i],y))x=t[x][i];L t[x][0];}main(){f>>n>>m;W(;i<=n;i++)f>>p[i];W(i=1;i<n;i++)f>>x>>y,t[y][0]=x,e[x].insert(y);W(i=1;i<=n;i++)r|=!t[i][0]*i;W(;j<16;j++)W(i=1;i<=n;i++){I&G=t[i][j];G=t[t[i][j-1]][j-1],G|=!G*r;}z(r);W(;m--;){f>>x>>y;c=p[o(x,y)];if(q<c|q==c&x<s|q==c&x==s&y<u)q=c,s=x,u=y;}g<<q<<' '<<s<<' '<<u;} | ^~~~ main.cpp: In function 'int main()': main.cpp:122:566: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] 122 | using I=int;using namespace std;InParser f("concurs.in");OutParser g("concurs.out");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=1,j=1;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;i--)if(!k(t[x][i],y))x=t[x][i];L t[x][0];}main(){f>>n>>m;W(;i<=n;i++)f>>p[i];W(i=1;i<n;i++)f>>x>>y,t[y][0]=x,e[x].insert(y);W(i=1;i<=n;i++)r|=!t[i][0]*i;W(;j<16;j++)W(i=1;i<=n;i++){I&G=t[i][j];G=t[t[i][j-1]][j-1],G|=!G*r;}z(r);W(;m--;){f>>x>>y;c=p[o(x,y)];if(q<c|q==c&x<s|q==c&x==s&y<u)q=c,s=x,u=y;}g<<q<<' '<<s<<' '<<u;} | ~^~~ main.cpp:122:569: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses] 122 | using I=int;using namespace std;InParser f("concurs.in");OutParser g("concurs.out");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=1,j=1;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;i--)if(!k(t[x][i],y))x=t[x][i];L t[x][0];}main(){f>>n>>m;W(;i<=n;i++)f>>p[i];W(i=1;i<n;i++)f>>x>>y,t[y][0]=x,e[x].insert(y);W(i=1;i<=n;i++)r|=!t[i][0]*i;W(;j<16;j++)W(i=1;i<=n;i++){I&G=t[i][j];G=t[t[i][j-1]][j-1],G|=!G*r;}z(r);W(;m--;){f>>x>>y;c=p[o(x,y)];if(q<c|q==c&x<s|q==c&x==s&y<u)q=c,s=x,u=y;}g<<q<<' '<<s<<' '<<u;} | ~~~~^~~~ main.cpp:122:575: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] 122 | using I=int;using namespace std;InParser f("concurs.in");OutParser g("concurs.out");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=1,j=1;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;i--)if(!k(t[x][i],y))x=t[x][i];L t[x][0];}main(){f>>n>>m;W(;i<=n;i++)f>>p[i];W(i=1;i<n;i++)f>>x>>y,t[y][0]=x,e[x].insert(y);W(i=1;i<=n;i++)r|=!t[i][0]*i;W(;j<16;j++)W(i=1;i<=n;i++){I&G=t[i][j];G=t[t[i][j-1]][j-1],G|=!G*r;}z(r);W(;m--;){f>>x>>y;c=p[o(x,y)];if(q<c|q==c&x<s|q==c&x==s&y<u)q=c,s=x,u=y;}g<<q<<' '<<s<<' '<<u;} | ~^~~ main.cpp:122:585: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] 122 | using I=int;using namespace std;InParser f("concurs.in");OutParser g("concurs.out");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=1,j=1;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;i--)if(!k(t[x][i],y))x=t[x][i];L t[x][0];}main(){f>>n>>m;W(;i<=n;i++)f>>p[i];W(i=1;i<n;i++)f>>x>>y,t[y][0]=x,e[x].insert(y);W(i=1;i<=n;i++)r|=!t[i][0]*i;W(;j<16;j++)W(i=1;i<=n;i++){I&G=t[i][j];G=t[t[i][j-1]][j-1],G|=!G*r;}z(r);W(;m--;){f>>x>>y;c=p[o(x,y)];if(q<c|q==c&x<s|q==c&x==s&y<u)q=c,s=x,u=y;}g<<q<<' '<<s<<' '<<u;} | ~^~ main.cpp:122:583: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses] 122 | using I=int;using namespace std;InParser f("concurs.in");OutParser g("concurs.out");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=1,j=1;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;i--)if(!k(t[x][i],y))x=t[x][i];L t[x][0];}main(){f>>n>>m;W(;i<=n;i++)f>>p[i];W(i=1;i<n;i++)f>>x>>y,t[y][0]=x,e[x].insert(y);W(i=1;i<=n;i++)r|=!t[i][0]*i;W(;j<16;j++)W(i=1;i<=n;i++){I&G=t[i][j];G=t[t[i][j-1]][j-1],G|=!G*r;}z(r);W(;m--;){f>>x>>y;c=p[o(x,y)];if(q<c|q==c&x<s|q==c&x==s&y<u)q=c,s=x,u=y;}g<<q<<' '<<s<<' '<<u;} | ~~~~~~~~~^~~~
Test Timp executie Memorie folosita Mesaj Punctaj/test
11ms2392kbOK10
21ms2129kbOK10
31ms2392kbOK10
42ms2654kbOK10
52ms2654kbOK10
63ms3440kbOK10
714ms6848kbOK10
86ms4751kbOK10
929ms6062kbOK10
1039ms6062kbOK10
Punctaj total100

Ceva nu functioneaza?