Borderou de evaluare (job #2943503)

Utilizator lucametehauDart Monkey lucametehau Data 21 noiembrie 2022 07:44:34
Problema Arbore partial de cost minim Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 100

Raport evaluator

Compilare: main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<bits/stdc++.h> | ^~~~~~ main.cpp:2:153: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | std::ifstream r("apm.in");std::ofstream w("apm.out");int m,k,i,j,z,t[1<<20],x;struct s{int x,y,z;}d,e[1<<20];int f(int x){return x^t[x]?t[x]=f(t[x]):x;}main(){r>>m>>m;while(r>>e[i].x>>e[i].y>>e[t[i]=i].z)i++;std::sort(e,e+m,[](s a,s b){return a.z<b.z;});while(j<m)d=e[j],e[(t[x=f(d.x)]=f(d.y))^x?z+=d.z,k++:j++]=d;w<<z<<" "<<k<<" ";while(k--)w<<e[k].x<<" "<<e[k].y<<" ";} | ^~~~ main.cpp: In function 'int main()': main.cpp:2:278: warning: operation on 'x' may be undefined [-Wsequence-point] 2 | std::ifstream r("apm.in");std::ofstream w("apm.out");int m,k,i,j,z,t[1<<20],x;struct s{int x,y,z;}d,e[1<<20];int f(int x){return x^t[x]?t[x]=f(t[x]):x;}main(){r>>m>>m;while(r>>e[i].x>>e[i].y>>e[t[i]=i].z)i++;std::sort(e,e+m,[](s a,s b){return a.z<b.z;});while(j<m)d=e[j],e[(t[x=f(d.x)]=f(d.y))^x?z+=d.z,k++:j++]=d;w<<z<<" "<<k<<" ";while(k--)w<<e[k].x<<" "<<e[k].y<<" ";} | ~^~~~~~~ main.cpp:2:278: warning: operation on 'x' may be undefined [-Wsequence-point]
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms188kbCorect10
20ms184kbCorect10
30ms184kbCorect10
40ms184kbCorect10
50ms184kbCorect10
645ms2060kbCorect10
785ms3805kbCorect10
813ms839kbCorect10
913ms1101kbCorect10
1073ms3280kbCorect10
Punctaj total100

Ceva nu functioneaza?