Pagini recente » Borderou de evaluare (job #1682471) | Borderou de evaluare (job #1063613) | Borderou de evaluare (job #984838) | Borderou de evaluare (job #397385) | Borderou de evaluare (job #3150157)
Borderou de evaluare (job #3150157)
Raport evaluator
Compilare:
main.cpp: In function 'I k(I, I)':
main.cpp:4:229: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
4 | using I=int;using namespace std;ifstream f("concurs.in");ofstream 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=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;)if(!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;i)r|=!t[i][0]*i;W(;++j<16;)W(i=0;++i<=n;){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)];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:4:342: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | using I=int;using namespace std;ifstream f("concurs.in");ofstream 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=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;)if(!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;i)r|=!t[i][0]*i;W(;++j<16;)W(i=0;++i<=n;){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)];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:4:432: warning: for increment expression has no effect [-Wunused-value]
4 | using I=int;using namespace std;ifstream f("concurs.in");ofstream 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=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;)if(!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;i)r|=!t[i][0]*i;W(;++j<16;)W(i=0;++i<=n;){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)];q>c|q==c&x>s|q==c&x==s&y>u?:q=c,s=x,u=y;}g<<q<<' '<<s<<' '<<u;}
| ^
main.cpp:4:554: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
4 | using I=int;using namespace std;ifstream f("concurs.in");ofstream 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=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;)if(!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;i)r|=!t[i][0]*i;W(;++j<16;)W(i=0;++i<=n;){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)];q>c|q==c&x>s|q==c&x==s&y>u?:q=c,s=x,u=y;}g<<q<<' '<<s<<' '<<u;}
| ~^~~
main.cpp:4:557: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
4 | using I=int;using namespace std;ifstream f("concurs.in");ofstream 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=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;)if(!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;i)r|=!t[i][0]*i;W(;++j<16;)W(i=0;++i<=n;){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)];q>c|q==c&x>s|q==c&x==s&y>u?:q=c,s=x,u=y;}g<<q<<' '<<s<<' '<<u;}
| ~~~~^~~~
main.cpp:4:563: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
4 | using I=int;using namespace std;ifstream f("concurs.in");ofstream 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=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;)if(!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;i)r|=!t[i][0]*i;W(;++j<16;)W(i=0;++i<=n;){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)];q>c|q==c&x>s|q==c&x==s&y>u?:q=c,s=x,u=y;}g<<q<<' '<<s<<' '<<u;}
| ~^~~
main.cpp:4:573: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
4 | using I=int;using namespace std;ifstream f("concurs.in");ofstream 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=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;)if(!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;i)r|=!t[i][0]*i;W(;++j<16;)W(i=0;++i<=n;){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)];q>c|q==c&x>s|q==c&x==s&y>u?:q=c,s=x,u=y;}g<<q<<' '<<s<<' '<<u;}
| ~^~
main.cpp:4:571: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
4 | using I=int;using namespace std;ifstream f("concurs.in");ofstream 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=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;)if(!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;i)r|=!t[i][0]*i;W(;++j<16;)W(i=0;++i<=n;){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)];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 |
1 | 1ms | 2129kb | OK | 10 |
2 | 1ms | 2134kb | OK | 10 |
3 | 1ms | 2392kb | Incorect | 0 |
4 | 2ms | 2658kb | Incorect | 0 |
5 | 2ms | 2654kb | Incorect | 0 |
6 | 5ms | 3440kb | Incorect | 0 |
7 | 39ms | 6848kb | Incorect | 0 |
8 | 8ms | 4751kb | Incorect | 0 |
9 | 48ms | 5820kb | Incorect | 0 |
10 | 74ms | 5935kb | Incorect | 0 |
Punctaj total | 20 |