Pagini recente » Borderou de evaluare (job #1763678) | Borderou de evaluare (job #2193086) | Borderou de evaluare (job #2359622) | Borderou de evaluare (job #2244405) | Borderou de evaluare (job #2941960)
Borderou de evaluare (job #2941960)
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 | 14ms | 15806kb | Corect | 10 |
2 | 13ms | 15781kb | Corect | 10 |
3 | 13ms | 15917kb | Corect | 10 |
4 | 12ms | 15912kb | Corect | 10 |
5 | 13ms | 15912kb | Corect | 10 |
6 | 104ms | 24395kb | Corect | 10 |
7 | 179ms | 33140kb | Corect | 10 |
8 | 44ms | 19369kb | Corect | 10 |
9 | 47ms | 19628kb | Corect | 10 |
10 | 158ms | 30777kb | Corect | 10 |
Punctaj total | 100 |