Problem swords
User thelusidian
Submission Time 2025-01-23 12:55:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swords.cpp: In function ‘int main()’:
swords.cpp:16:25: error: ‘index2’ was not declared in this scope; did you mean ‘index’?
16 | while (swords.size() > index2){
| ^~~~~~
| index
swords.cpp:17:5: error: ‘else’ without a previous ‘if’
17 | } else if (swords[index].second >= swords[index+1].second){
| ^~~~
swords.cpp: At global scope:
swords.cpp:26:2: error: ‘cout’ does not name a type
26 | cout << swords.size();
| ^~~~
swords.cpp:27:1: error: expected declaration before ‘}’ token
27 | }
| ^