Borderou de evaluare (job #2288261)

Utilizator BlaugranasEnal Gemaledin Blaugranas Data 22 noiembrie 2018 23:32:47
Problema Algoritmul lui Dijkstra Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'void U(short unsigned int)': main.cpp:14:26: error: 'swap' was not declared in this scope swap(h[w>>1],h[w]); ^ main.cpp:14:26: note: suggested alternatives: In file included from /usr/include/c++/6/utility:70:0, from /usr/include/c++/6/algorithm:60, from main.cpp:2: /usr/include/c++/6/bits/stl_pair.h:475:5: note: 'std::swap' swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) ^~~~ In file included from /usr/include/c++/6/bits/stl_pair.h:59:0, from /usr/include/c++/6/utility:70, from /usr/include/c++/6/algorithm:60, from main.cpp:2: /usr/include/c++/6/bits/move.h:179:5: note: 'std::swap' swap(_Tp& __a, _Tp& __b) ^~~~ In file included from /usr/include/c++/6/exception:170:0, from /usr/include/c++/6/new:40, from /usr/include/c++/6/bits/stl_construct.h:59, from /usr/include/c++/6/bits/stl_tempbuf.h:60, from /usr/include/c++/6/bits/stl_algo.h:62, from /usr/include/c++/6/algorithm:62, from main.cpp:2: /usr/include/c++/6/bits/exception_ptr.h:162:5: note: 'std::__exception_ptr::swap' swap(exception_ptr& __lhs, exception_ptr& __rhs) ^~~~ main.cpp: In function 'int main()': main.cpp:18:91: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'short unsigned int*' [-Wformat=] freopen("dijkstra.in","r",stdin),freopen("dijkstra.out","w",stdout),scanf("%d%d",&n,&m); ^ main.cpp:20:32: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'short unsigned int*' [-Wformat=] scanf("%d%d%d",&u,&w,&f); ^ main.cpp:20:32: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'short unsigned int*' [-Wformat=] main.cpp:20:32: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'short unsigned int*' [-Wformat=] main.cpp:26:9: error: 'p' was not declared in this scope for(p[1]=h[++k]=1;k;) { ^ main.cpp:36:27: error: 'swap' was not declared in this scope swap(h[w],h[f]),w=f; ^ main.cpp:36:27: note: suggested alternatives: In file included from /usr/include/c++/6/utility:70:0, from /usr/include/c++/6/algorithm:60, from main.cpp:2: /usr/include/c++/6/bits/stl_pair.h:475:5: note: 'std::swap' swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) ^~~~ Non zero exit status: 1

Ceva nu functioneaza?