Problem gentlepairs
User Hytoh
Submission Time 2023-12-06 15:30:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gentlepairs.cpp: In function ‘int main()’:
gentlepairs.cpp:16:15: error: ‘j’ was not declared in this scope
16 | if (abs(a[j].second - a[i].second) / abs(a[j].first - a[i].first) >= -1 && abs(a[j].second - a[i].second) / abs(a[j].first - a[i].first) <= 1) { ans++;
| ^
gentlepairs.cpp: At global scope:
gentlepairs.cpp:20:2: error: ‘cout’ does not name a type
20 | cout << ans/2 << endl;
| ^~~~
gentlepairs.cpp:21:2: error: expected unqualified-id before ‘return’
21 | return 0;
| ^~~~~~
gentlepairs.cpp:22:1: error: expected declaration before ‘}’ token
22 | }
| ^