Pagini recente » Borderou de evaluare (job #1967914) | Borderou de evaluare (job #2303107) | Borderou de evaluare (job #3293613) | Borderou de evaluare (job #370657) | Borderou de evaluare (job #2944660)
Borderou de evaluare (job #2944660)
Raport evaluator
Compilare:
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<bits/stdc++.h>
| ^~~~~~
main.cpp:2:167: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | using namespace std;ofstream w("apm.out");ifstream r("apm.in");tuple<int,int,int>e[1<<20],d;int t[1<<20],m,a,b,c,i,j,k,x,p,q;int f(int x){return t[x]?t[x]=f(t[x]):x;}main(){r>>m>>m;while(r>>a>>b>>c)e[i++]={c,a,b};sort(e,e+m);for(;j<m;)tie(c,a,b)=d=e[j],e[f(b)^(x=f(a))?t[x]=b,p+=c,q++:j++]=d;w<<p<<" "<<q<<" ";for(;k<m;)tie(c,a,b)=e[k++],w<<a<<" "<<b<<" ";}
| ^~~~
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 0ms | 184kb | Corect | 10 |
2 | 0ms | 184kb | Corect | 10 |
3 | 0ms | 184kb | Corect | 10 |
4 | 0ms | 184kb | Corect | 10 |
5 | 0ms | 184kb | Corect | 10 |
6 | 70ms | 2916kb | Corect | 10 |
7 | 102ms | 4288kb | Corect | 10 |
8 | 18ms | 942kb | Corect | 10 |
9 | 28ms | 1323kb | Corect | 10 |
10 | 97ms | 4005kb | Corect | 10 |
Punctaj total | 100 |