Problem 4sum
User loyaltypollution
Submission Time 2026-02-18 13:47:35
Score 0
Max Time N/A
Max Memory N/A

Compile Error

4sum.cpp: In function ‘int main()’:
4sum.cpp:26:34: error: no match for ‘operator[]’ (operand types are ‘std::unordered_map<int, std::pair<int, int> >::mapped_type’ {aka ‘std::pair<int, int>’} and ‘int’)
26 | cout << t1 << t2 << m[-t1-t2][0] << m[-t1-t2][1] << endl;
| ^
4sum.cpp:26:50: error: no match for ‘operator[]’ (operand types are ‘std::unordered_map<int, std::pair<int, int> >::mapped_type’ {aka ‘std::pair<int, int>’} and ‘int’)
26 | cout << t1 << t2 << m[-t1-t2][0] << m[-t1-t2][1] << endl;
| ^