Pagini recente » Borderou de evaluare (job #2430012) | Borderou de evaluare (job #631225) | Borderou de evaluare (job #1564838) | Borderou de evaluare (job #2305873) | Borderou de evaluare (job #2941962)
Borderou de evaluare (job #2941962)
Raport evaluator
Compilare:
main.cpp:3:167: 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];set<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].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 | 27ms | 30285kb | Corect | 10 |
2 | 28ms | 30208kb | Corect | 10 |
3 | 28ms | 30322kb | Corect | 10 |
4 | 29ms | 30380kb | Corect | 10 |
5 | 29ms | 30343kb | Corect | 10 |
6 | 189ms | 43364kb | Corect | 10 |
7 | 375ms | 55177kb | Corect | 10 |
8 | 75ms | 35332kb | Corect | 10 |
9 | 85ms | 35643kb | Corect | 10 |
10 | 313ms | 51290kb | Corect | 10 |
Punctaj total | 100 |