Problem | swords |
---|---|
User | loverin |
Submission Time | 2023-04-11 09:23:18 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
swords.cpp: In function ‘int main()’:
swords.cpp:11:17: error: ‘pair’ was not declared in this scope; did you mean ‘std::pair’?
11 | std::vector<pair<int, int>> swords(n);
| ^~~~
| std::pair
In file included from /usr/include/c++/9/utility:70,
from /usr/include/c++/9/algorithm:60,
from swords.cpp:1:
/usr/include/c++/9/bits/stl_pair.h:208:12: note: ‘std::pair’ declared here
208 | struct pair
| ^~~~
swords.cpp:11:30: error: template argument 1 is invalid
11 | std::vector<pair<int, int>> swords(n);
| ^~
swords.cpp:11:30: error: template argument 2 is invalid
swords.cpp:13:29: error: invalid types ‘int[int]’ for array subscript
13 | std::cin >> swords[i].attack >> swords[i].defense;
| ^
swords.cpp:13:49: error