Problem swords
User PerihelionfromAphelion
Submission Time 2026-08-21 17:24:39
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swords.cpp: In function ‘int32_t main()’:
swords.cpp:10:32: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
10 | vector<pair<int, int>> swords(n);
| ^
| yn
swords.cpp:13:7: error: ‘i’ was not declared in this scope
13 | for (i = 0; i < n; i++) {
| ^
swords.cpp:21:7: error: ‘i’ was not declared in this scope
21 | for (i = 0; i < n; i++) {
| ^
swords.cpp:22:8: error: ‘j’ was not declared in this scope; did you mean ‘jn’?
22 | for (j = i + 1; j < n; j++) {
| ^
| jn
swords.cpp:23:8: error: ‘b’ was not declared in this scope
23 | if (b[j] > b[i]) {
| ^