examination.cpp:40:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main(){
^
examination.cpp: In function 'int main()':
examination.cpp:9:35: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
#define Scan(a) scanf ("%I64d", &a)
~~^~
#define scan(a) scanf ("%d", &a)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
using namespace std;
~~~~~~~~~~~~~~~~~~~~~
~
const long long INF = (int)1e18 + 7;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const int N = (int)3e5 + 7;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const int mod = 1000000007;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
int n, q, s[N], t[N];
~~~~~~~~~~~~~~~~~~~~~~
vector<pair<pair<int,int >,int >> v,w;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
bool cmp(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if(x.fr.fr == y.fr.fr){
~~~~~~~~~~~~~~~~~~~~~~~~
return x.fr.sc < y.fr.sc;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
else{
~~~~~~
return x.fr.fr < y.fr.fr;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
}
~~
bool cmp1(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if(x.fr.sc == y.fr.sc){
~~~~~~~~~~~~~~~~~~~~~~~~
return x.sc < y.sc;
~~~~~~~~~~~~~~~~~~~~
}
~~
else{
~~~~~~
return x.fr.sc < y.fr.sc;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
}
~~
bool cmp2(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
return x.sc < y.sc;
~~~~~~~~~~~~~~~~~~~~
}
~~
main(){
~~~~~~~~
cin >> n >> q;
~~~~~~~~~~~~~~~
for(int i = 1;i <= n; i++){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scan(s[i]);
~~~~~~~~~
examination.cpp:43:13: note: in expansion of macro 'Scan'
Scan(s[i]);
^~~~
examination.cpp:9:35: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
#define Scan(a) scanf ("%I64d", &a)
~~^~
#define scan(a) scanf ("%d", &a)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
using namespace std;
~~~~~~~~~~~~~~~~~~~~~
~
const long long INF = (int)1e18 + 7;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const int N = (int)3e5 + 7;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const int mod = 1000000007;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
int n, q, s[N], t[N];
~~~~~~~~~~~~~~~~~~~~~~
vector<pair<pair<int,int >,int >> v,w;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
bool cmp(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if(x.fr.fr == y.fr.fr){
~~~~~~~~~~~~~~~~~~~~~~~~
return x.fr.sc < y.fr.sc;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
else{
~~~~~~
return x.fr.fr < y.fr.fr;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
}
~~
bool cmp1(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if(x.fr.sc == y.fr.sc){
~~~~~~~~~~~~~~~~~~~~~~~~
return x.sc < y.sc;
~~~~~~~~~~~~~~~~~~~~
}
~~
else{
~~~~~~
return x.fr.sc < y.fr.sc;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
}
~~
bool cmp2(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
return x.sc < y.sc;
~~~~~~~~~~~~~~~~~~~~
}
~~
main(){
~~~~~~~~
cin >> n >> q;
~~~~~~~~~~~~~~~
for(int i = 1;i <= n; i++){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scan(s[i]);
~~~~~~~~~~~~
Scan(t[i]);
~~~~~~~~~
examination.cpp:44:13: note: in expansion of macro 'Scan'
Scan(t[i]);
^~~~
examination.cpp:9:35: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
#define Scan(a) scanf ("%I64d", &a)
~~^~
#define scan(a) scanf ("%d", &a)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
using namespace std;
~~~~~~~~~~~~~~~~~~~~~
~
const long long INF = (int)1e18 + 7;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const int N = (int)3e5 + 7;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const int mod = 1000000007;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
int n, q, s[N], t[N];
~~~~~~~~~~~~~~~~~~~~~~
vector<pair<pair<int,int >,int >> v,w;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
bool cmp(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if(x.fr.fr == y.fr.fr){
~~~~~~~~~~~~~~~~~~~~~~~~
return x.fr.sc < y.fr.sc;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
else{
~~~~~~
return x.fr.fr < y.fr.fr;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
}
~~
bool cmp1(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if(x.fr.sc == y.fr.sc){
~~~~~~~~~~~~~~~~~~~~~~~~
return x.sc < y.sc;
~~~~~~~~~~~~~~~~~~~~
}
~~
else{
~~~~~~
return x.fr.sc < y.fr.sc;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
}
~~
bool cmp2(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
return x.sc < y.sc;
~~~~~~~~~~~~~~~~~~~~
}
~~
main(){
~~~~~~~~
cin >> n >> q;
~~~~~~~~~~~~~~~
for(int i = 1;i <= n; i++){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scan(s[i]);
~~~~~~~~~~~~
Scan(t[i]);
~~~~~~~~~~~~
v.pb(mk(mk(s[i] + t[i],s[i]),t[i]));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
sort(all(v),cmp);
~~~~~~~~~~~~~~~~~~
int a, b, c;
~~~~~~~~~~~~~
while(q--){
~~~~~~~~~~~~
Scan(a);
~~~~~~
examination.cpp:50:13: note: in expansion of macro 'Scan'
Scan(a);
^~~~
examination.cpp:9:35: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
#define Scan(a) scanf ("%I64d", &a)
~~^~
#define scan(a) scanf ("%d", &a)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
using namespace std;
~~~~~~~~~~~~~~~~~~~~~
~
const long long INF = (int)1e18 + 7;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const int N = (int)3e5 + 7;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const int mod = 1000000007;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
int n, q, s[N], t[N];
~~~~~~~~~~~~~~~~~~~~~~
vector<pair<pair<int,int >,int >> v,w;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
bool cmp(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if(x.fr.fr == y.fr.fr){
~~~~~~~~~~~~~~~~~~~~~~~~
return x.fr.sc < y.fr.sc;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
else{
~~~~~~
return x.fr.fr < y.fr.fr;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
}
~~
bool cmp1(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if(x.fr.sc == y.fr.sc){
~~~~~~~~~~~~~~~~~~~~~~~~
return x.sc < y.sc;
~~~~~~~~~~~~~~~~~~~~
}
~~
else{
~~~~~~
return x.fr.sc < y.fr.sc;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
}
~~
bool cmp2(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
return x.sc < y.sc;
~~~~~~~~~~~~~~~~~~~~
}
~~
main(){
~~~~~~~~
cin >> n >> q;
~~~~~~~~~~~~~~~
for(int i = 1;i <= n; i++){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scan(s[i]);
~~~~~~~~~~~~
Scan(t[i]);
~~~~~~~~~~~~
v.pb(mk(mk(s[i] + t[i],s[i]),t[i]));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
sort(all(v),cmp);
~~~~~~~~~~~~~~~~~~
int a, b, c;
~~~~~~~~~~~~~
while(q--){
~~~~~~~~~~~~
Scan(a);
~~~~~~~~~
Scan(b);
~~~~~~
examination.cpp:51:13: note: in expansion of macro 'Scan'
Scan(b);
^~~~
examination.cpp:9:35: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
#define Scan(a) scanf ("%I64d", &a)
~~^~
#define scan(a) scanf ("%d", &a)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
using namespace std;
~~~~~~~~~~~~~~~~~~~~~
~
const long long INF = (int)1e18 + 7;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const int N = (int)3e5 + 7;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const int mod = 1000000007;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
int n, q, s[N], t[N];
~~~~~~~~~~~~~~~~~~~~~~
vector<pair<pair<int,int >,int >> v,w;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~
bool cmp(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if(x.fr.fr == y.fr.fr){
~~~~~~~~~~~~~~~~~~~~~~~~
return x.fr.sc < y.fr.sc;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
else{
~~~~~~
return x.fr.fr < y.fr.fr;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
}
~~
bool cmp1(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if(x.fr.sc == y.fr.sc){
~~~~~~~~~~~~~~~~~~~~~~~~
return x.sc < y.sc;
~~~~~~~~~~~~~~~~~~~~
}
~~
else{
~~~~~~
return x.fr.sc < y.fr.sc;
~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
}
~~
bool cmp2(const pair<pair<int,int >,int > &x, const pair<pair<int,int >,int > &y){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
return x.sc < y.sc;
~~~~~~~~~~~~~~~~~~~~
}
~~
main(){
~~~~~~~~
cin >> n >> q;
~~~~~~~~~~~~~~~
for(int i = 1;i <= n; i++){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scan(s[i]);
~~~~~~~~~~~~
Scan(t[i]);
~~~~~~~~~~~~
v.pb(mk(mk(s[i] + t[i],s[i]),t[i]));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
~~
sort(all(v),cmp);
~~~~~~~~~~~~~~~~~~
int a, b, c;
~~~~~~~~~~~~~
while(q--){
~~~~~~~~~~~~
Scan(a);
~~~~~~~~~
Scan(b);
~~~~~~~~~
Scan(c);
~~~~~~
examination.cpp:52:13: note: in expansion of macro 'Scan'
Scan(c);
^~~~
examination.cpp:9:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
#define Scan(a) scanf ("%I64d", &a)
~~~~~~^~~~~~~~~~~~~
examination.cpp:43:13: note: in expansion of macro 'Scan'
Scan(s[i]);
^~~~
examination.cpp:9:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
#define Scan(a) scanf ("%I64d", &a)
~~~~~~^~~~~~~~~~~~~
examination.cpp:44:13: note: in expansion of macro 'Scan'
Scan(t[i]);
^~~~
examination.cpp:9:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
#define Scan(a) scanf ("%I64d", &a)
~~~~~~^~~~~~~~~~~~~
examination.cpp:50:13: note: in expansion of macro 'Scan'
Scan(a);
^~~~
examination.cpp:9:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
#define Scan(a) scanf ("%I64d", &a)
~~~~~~^~~~~~~~~~~~~
examination.cpp:51:13: note: in expansion of macro 'Scan'
Scan(b);
^~~~
examination.cpp:9:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
#define Scan(a) scanf ("%I64d", &a)
~~~~~~^~~~~~~~~~~~~
examination.cpp:52:13: note: in expansion of macro 'Scan'
Scan(c);
^~~~