Pagini recente » Borderou de evaluare (job #506628) | Borderou de evaluare (job #1522741) | Borderou de evaluare (job #2397518) | Borderou de evaluare (job #1070297) | Borderou de evaluare (job #2941957)
Borderou de evaluare (job #2941957)
Raport evaluator
Compilare:
main.cpp:3:170: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | using namespace std;ifstream i("apm.in");ofstream o("apm.out");const t h=3e5;t p[h];vector<vector<t>>g[h+h],f;t a(t x){if(x^p[x])p[x]=a(p[x]);return p[x];}t n,m,x,y,c,s;main(){i>>n>>m;iota(p,p+h,0);while(m--)i>>x>>y>>c,g[c+h].push_back({x,y});for(auto&z:g)for(auto&e:z){x=a(e[0]);y=a(e[1]);if(x^y)f.push_back(e),s+=&z-g-h;p[x]=y;}o<<s<<' '<<n-1<<' ';for(auto&e:f)o<<e[0]<<" "<<e[1]<<' ';}
| ^~~~
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 15ms | 15818kb | Corect | 10 |
2 | 15ms | 15826kb | Corect | 10 |
3 | 15ms | 15888kb | Corect | 10 |
4 | 15ms | 15855kb | Corect | 10 |
5 | 13ms | 15912kb | Corect | 10 |
6 | 102ms | 24469kb | Corect | 10 |
7 | 177ms | 33091kb | Corect | 10 |
8 | 41ms | 19374kb | Corect | 10 |
9 | 42ms | 19623kb | Corect | 10 |
10 | 156ms | 30715kb | Corect | 10 |
Punctaj total | 100 |