Borderou de evaluare (job #3194794)
Utilizator | Data | 19 ianuarie 2024 13:08:33 | |
---|---|---|---|
Problema | Foametea | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:12:1: error: 'vector' does not name a type
12 | vector<int>G[100001];
| ^~~~~~
main.cpp: In function 'int main()':
main.cpp:6:13: error: no match for 'operator=' (operand types are 'std::pair<int, int>' and 'int')
6 | #define INF 1000000000
| ^~~~~~~~~~
main.cpp:18:29: note: in expansion of macro 'INF'
18 | cin>>v[i]; optim[i]=INF;}
| ^~~
In file included from /usr/include/c++/12.2.1/bits/stl_algobase.h:64,
from /usr/include/c++/12.2.1/string:50,
from /usr/include/c++/12.2.1/bits/locale_classes.h:40,
from /usr/include/c++/12.2.1/bits/ios_base.h:41,
from /usr/include/c++/12.2.1/ios:42,
from /usr/include/c++/12.2.1/ostream:38,
from /usr/include/c++/12.2.1/iostream:39,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/stl_pair.h:353:9: note: candidate: 'template<class _U1, class _U2> constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) requires _S_assignable<const _U1&, const _U2&>() [with _U2 = _U1; _T1 = int; _T2 = int]'
353 | operator=(const pair<_U1, _U2>& __p)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:353:9: note: template argument deduction/substitution failed:
main.cpp:6:13: note: mismatched types 'const std::pair<_T1, _T2>' and 'int'
6 | #define INF 1000000000
| ^~~~~~~~~~
main.cpp:18:29: note: in expansion of macro 'INF'
18 | cin>>v[i]; optim[i]=INF;}
| ^~~
/usr/include/c++/12.2.1/bits/stl_pair.h:365:9: note: candidate: 'template<class _U1, class _U2> constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) requires _S_assignable<_U1, _U2>() [with _U2 = _U1; _T1 = int; _T2 = int]'
365 | operator=(pair<_U1, _U2>&& __p)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:365:9: note: template argument deduction/substitution failed:
main.cpp:6:13: note: mismatched types 'std::pair<_T1, _T2>' and 'int'
6 | #define INF 1000000000
| ^~~~~~~~~~
main.cpp:18:29: note: in expansion of macro 'INF'
18 | cin>>v[i]; optim[i]=INF;}
| ^~~
/usr/include/c++/12.2.1/bits/stl_pair.h:330:7: note: candidate: 'constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_T1, _T2>&) requires _S_assignable<const _T1&, const _T2&>() [with _T1 = int; _T2 = int]'
330 | operator=(const pair& __p)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:330:29: note: no known conversion for argument 1 from 'int' to 'const std::pair<int, int>&'
330 | operator=(const pair& __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_pair.h:341:7: note: candidate: 'constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_T1, _T2>&&) requires _S_assignable<_T1, _T2>() [with _T1 = int; _T2 = int]'
341 | operator=(pair&& __p)
| ^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_pair.h:341:24: note: no known conversion for argument 1 from 'int' to 'std::pair<int, int>&&'
341 | operator=(pair&& __p)
| ~~~~~~~^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !