nicegift.cpp:18:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
18 | main(){
| ^
nicegift.cpp: In function 'int main()':
nicegift.cpp:20:11: warning: unused variable 'j' [-Wunused-variable]
20 | int i,j,ans=1,n,m;
| ^
nicegift.cpp:10:25: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
10 | #define scan2(a,b) scanf("%d %d",&a, &b);
| ~~~~~^~~~~~~~~~~~~~~~
nicegift.cpp:21:5: note: in expansion of macro 'scan2'
21 | scan2(n,m)
| ^~~~~
nicegift.cpp:9:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
9 | #define scan1(a) scanf("%d",&a);
| ~~~~~^~~~~~~~~
nicegift.cpp:23:9: note: in expansion of macro 'scan1'
23 | scan1(q[i])
| ^~~~~