Problem swords
User 13ikaeel
Submission Time 2024-02-01 20:37:06
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swords.cpp:2:36: error: ‘vector’ does not name a type
2 | int countUsefulSwords(int n, const vector<pair<int, int>>& swords) {
| ^~~~~~
swords.cpp:2:42: error: expected ‘,’ or ‘...’ before ‘<’ token
2 | int countUsefulSwords(int n, const vector<pair<int, int>>& swords) {
| ^
swords.cpp: In function ‘int countUsefulSwords(int, int)’:
swords.cpp:8:22: error: ‘swords’ was not declared in this scope
8 | int attack = swords[i].first;
| ^~~~~~
swords.cpp: In function ‘int main()’:
swords.cpp:23:5: error: ‘cin’ was not declared in this scope
23 | cin >> n;
| ^~~
swords.cpp:25:5: error: ‘vector’ was not declared in this scope
25 | vector<pair<int, int>> swords(n);
| ^~~~~~
swords.cpp:25:12: error: ‘pair’ was not declared in this scop