Pagini recente » Borderou de evaluare (job #769085) | Borderou de evaluare (job #1001898) | Borderou de evaluare (job #2967075) | Borderou de evaluare (job #341491) | Borderou de evaluare (job #2943503)
Borderou de evaluare (job #2943503)
Raport evaluator
Compilare:
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<bits/stdc++.h>
| ^~~~~~
main.cpp:2:153: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | std::ifstream r("apm.in");std::ofstream w("apm.out");int m,k,i,j,z,t[1<<20],x;struct s{int x,y,z;}d,e[1<<20];int f(int x){return x^t[x]?t[x]=f(t[x]):x;}main(){r>>m>>m;while(r>>e[i].x>>e[i].y>>e[t[i]=i].z)i++;std::sort(e,e+m,[](s a,s b){return a.z<b.z;});while(j<m)d=e[j],e[(t[x=f(d.x)]=f(d.y))^x?z+=d.z,k++:j++]=d;w<<z<<" "<<k<<" ";while(k--)w<<e[k].x<<" "<<e[k].y<<" ";}
| ^~~~
main.cpp: In function 'int main()':
main.cpp:2:278: warning: operation on 'x' may be undefined [-Wsequence-point]
2 | std::ifstream r("apm.in");std::ofstream w("apm.out");int m,k,i,j,z,t[1<<20],x;struct s{int x,y,z;}d,e[1<<20];int f(int x){return x^t[x]?t[x]=f(t[x]):x;}main(){r>>m>>m;while(r>>e[i].x>>e[i].y>>e[t[i]=i].z)i++;std::sort(e,e+m,[](s a,s b){return a.z<b.z;});while(j<m)d=e[j],e[(t[x=f(d.x)]=f(d.y))^x?z+=d.z,k++:j++]=d;w<<z<<" "<<k<<" ";while(k--)w<<e[k].x<<" "<<e[k].y<<" ";}
| ~^~~~~~~
main.cpp:2:278: warning: operation on 'x' may be undefined [-Wsequence-point]
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 0ms | 188kb | Corect | 10 |
2 | 0ms | 184kb | Corect | 10 |
3 | 0ms | 184kb | Corect | 10 |
4 | 0ms | 184kb | Corect | 10 |
5 | 0ms | 184kb | Corect | 10 |
6 | 45ms | 2060kb | Corect | 10 |
7 | 85ms | 3805kb | Corect | 10 |
8 | 13ms | 839kb | Corect | 10 |
9 | 13ms | 1101kb | Corect | 10 |
10 | 73ms | 3280kb | Corect | 10 |
Punctaj total | 100 |