nicegift.cpp: In function 'void solve()':
nicegift.cpp:35:9: error: 'sum' was not declared in this scope
35 | sum+=a[i];
| ^~~
nicegift.cpp:38:5: error: 'sum' was not declared in this scope
38 | if(sum%k) {cout<<"-1\n";return;}
| ^~~
nicegift.cpp:38:9: error: 'k' was not declared in this scope
38 | if(sum%k) {cout<<"-1\n";return;}
| ^
nicegift.cpp:39:8: error: 'sum' was not declared in this scope
39 | cout<<sum/2<<endl;
| ^~~
nicegift.cpp:41:20: error: 'struct std::pair<long long int, long long int>' has no member named 'y'
41 | cout<<"1 "<<a[n].y<<' '<<a[n-1].y<<endl;
| ^
nicegift.cpp:41:35: error: 'struct std::pair<long long int, long long int>' has no member named 'y'
41 | cout<<"1 "<<a[n].y<<' '<<a[n-1].y<<endl;
| ^
nicegift.cpp:42:8: error: 'struct std::pair<long long int, long long int>' has no member named 'x'
42 | a[n].x--;
| ^
nicegift.cpp:43:10: error: 'struct std::pair<long long int, long long int>' has no member named 'x'
43 | a[n-1].x--;
| ^
nicegift.cpp: In function 'void fre_open()':
nicegift.cpp:26:24: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
26 | void fre_open(){freopen("file.in","r",stdin);freopen("file.out","w",stdout);}
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
nicegift.cpp:26:53: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
26 | void fre_open(){freopen("file.in","r",stdin);freopen("file.out","w",stdout);}
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~