| Problem | monsters2 |
|---|---|
| User | epignhan97 |
| Submission Time | 2025-03-25 21:52:28 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
monsters2.cpp: In function ‘int main()’:
monsters2.cpp:8:5: error: expected ‘,’ or ‘;’ before ‘vector’
8 | vector<pair<int, int>> monsters(n); // (position, health)
| ^~~~~~
monsters2.cpp:11:5: error: expected ‘,’ or ‘;’ before ‘for’
11 | for (int i = 0; i < n; i++) {
| ^~~
monsters2.cpp:11:21: error: ‘i’ was not declared in this scope
11 | for (int i = 0; i < n; i++) {
| ^
monsters2.cpp:19:20: error: ‘monsters’ was not declared in this scope
19 | if (abs(mines[0]-monsters[ij].first) < monsters[ij].second){
| ^~~~~~~~
monsters2.cpp:22:24: error: ‘monsters’ was not declared in this scope
22 | s+= min(abs(mines[0]-monsters[ij].first),monsters[ij].second);
| ^~~~~~~~