Problem firecracker
User G
Submission Time 2024-02-10 21:41:07
Score 0
Max Time N/A
Max Memory N/A

Compile Error

firecracker.cpp: In function ‘int main()’:
firecracker.cpp:9:11: error: no match for ‘operator[]’ (operand types are ‘std::pair<int, int>’ and ‘int’)
9 | cin << f[i].first << f[i].second;
| ^
firecracker.cpp:9:25: error: no match for ‘operator[]’ (operand types are ‘std::pair<int, int>’ and ‘int’)
9 | cin << f[i].first << f[i].second;
| ^
firecracker.cpp:10:12: error: no match for ‘operator[]’ (operand types are ‘std::pair<int, int>’ and ‘int’)
10 | if (max<f[i].first) max = f[i].first;
| ^
firecracker.cpp:10:30: error: no match for ‘operator[]’ (operand types are ‘std::pair<int, int>’ and ‘int’)
10 | if (max<f[i].first) max = f[i].first;
| ^
firecracker.cpp:12:10: error: no match for ‘operator+’ (operand types are ‘std::pair<int, int>’ and ‘int’)
12 | sort(f,f+n)