Pagini recente » Borderou de evaluare (job #3294867) | Borderou de evaluare (job #390924) | Borderou de evaluare (job #3293465) | Borderou de evaluare (job #3293000) | Borderou de evaluare (job #2941966)
Borderou de evaluare (job #2941966)
Raport evaluator
Compilare:
main.cpp:3:165: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | const t h=3e5;using namespace std;ifstream i("apm.in");ofstream o("apm.out");t p[h],n,m,x,y,c,s;set<vector<t>>g[h+h],f;t a(t x){if(x^p[x])p[x]=a(p[x]);return p[x];}main(){i>>n>>m;iota(p,p+h,0);while(m--)i>>x>>y>>c,g[c+h].insert({x,y});for(auto&z:g)for(auto&e:z){x=a(e[0]);y=a(e[1]);if(x^y)f.insert(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 | 30ms | 30326kb | Corect | 10 |
2 | 29ms | 30326kb | Corect | 10 |
3 | 27ms | 30351kb | Corect | 10 |
4 | 27ms | 30314kb | Corect | 10 |
5 | 28ms | 30310kb | Corect | 10 |
6 | 187ms | 43290kb | Corect | 10 |
7 | 369ms | 55209kb | Corect | 10 |
8 | 73ms | 35360kb | Corect | 10 |
9 | 81ms | 35741kb | Corect | 10 |
10 | 311ms | 51286kb | Corect | 10 |
Punctaj total | 100 |