Language: C++

#include<bits/stdc++.h>
#define f first
#define s second
#define f for(i=0;i<m;i++)
using namespace std;
typedef pair<pair<int,int>,pair<int,int>>P;
bool c(P&f,P&s){return f.s.s<s.s.s;}
int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}

Compiler output:
a.cc:4:9: warning: "f" redefined
    4 | #define f for(i=0;i<m;i++)
      |         ^
a.cc:2:9: note: this is the location of the previous definition
    2 | #define f first
      |         ^
a.cc:4:11: error: expected ',' or '...' before 'for'
    4 | #define f for(i=0;i<m;i++)
      |           ^~~
a.cc:7:10: note: in expansion of macro 'f'
    7 | bool c(P&f,P&s){return f.s.s<s.s.s;}
      |          ^
a.cc:4:18: error: expected ')' before ';' token
    4 | #define f for(i=0;i<m;i++)
      |                  ^
a.cc:7:10: note: in expansion of macro 'f'
    7 | bool c(P&f,P&s){return f.s.s<s.s.s;}
      |          ^
a.cc:7:7: note: to match this '('
    7 | bool c(P&f,P&s){return f.s.s<s.s.s;}
      |       ^
a.cc:4:19: error: 'i' does not name a type
    4 | #define f for(i=0;i<m;i++)
      |                   ^
a.cc:7:10: note: in expansion of macro 'f'
    7 | bool c(P&f,P&s){return f.s.s<s.s.s;}
      |          ^
a.cc:4:23: error: 'i' does not name a type
    4 | #define f for(i=0;i<m;i++)
      |                       ^
a.cc:7:10: note: in expansion of macro 'f'
    7 | bool c(P&f,P&s){return f.s.s<s.s.s;}
      |          ^
a.cc: In function 'int main()':
a.cc:4:11: error: expected unqualified-id before 'for'
    4 | #define f for(i=0;i<m;i++)
      |           ^~~
a.cc:8:65: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                 ^
a.cc:4:26: error: expected ';' before ')' token
    4 | #define f for(i=0;i<m;i++)
      |                          ^
a.cc:8:65: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                 ^
a.cc:4:26: error: expected ';' before ')' token
    4 | #define f for(i=0;i<m;i++)
      |                          ^
a.cc:8:67: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                   ^
a.cc:4:26: error: expected ';' before ')' token
    4 | #define f for(i=0;i<m;i++)
      |                          ^
a.cc:8:76: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                            ^
a.cc:4:26: error: expected ';' before ')' token
    4 | #define f for(i=0;i<m;i++)
      |                          ^
a.cc:8:89: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                                         ^
a.cc:4:11: error: expected unqualified-id before 'for'
    4 | #define f for(i=0;i<m;i++)
      |           ^~~
a.cc:8:123: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                                                                           ^
a.cc:4:26: error: expected ';' before ')' token
    4 | #define f for(i=0;i<m;i++)
      |                          ^
a.cc:8:123: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                                                                           ^
a.cc:4:26: error: expected ';' before ')' token
    4 | #define f for(i=0;i<m;i++)
      |                          ^
a.cc:8:125: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                                                                             ^
a.cc:4:11: error: expected unqualified-id before 'for'
    4 | #define f for(i=0;i<m;i++)
      |           ^~~
a.cc:8:140: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                                                                                            ^
a.cc:8:140: error: expected ')' before 'for'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                                                                                   ~        ^
      |                                                                                                                                            )
a.cc:4:26: error: expected ';' before ')' token
    4 | #define f for(i=0;i<m;i++)
      |                          ^
a.cc:8:140: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                                                                                            ^
a.cc:4:26: error: expected ';' before ')' token
    4 | #define f for(i=0;i<m;i++)
      |                          ^
a.cc:8:142: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                                                                                              ^
a.cc:4:26: error: expected ';' before ')' token
    4 | #define f for(i=0;i<m;i++)
      |                          ^
a.cc:8:151: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                                                                                                       ^
a.cc:4:26: error: expected ';' before ')' token
    4 | #define f for(i=0;i<m;i++)
      |                          ^
a.cc:8:153: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                                                                                                         ^
a.cc:4:11: error: expected unqualified-id before 'for'
    4 | #define f for(i=0;i<m;i++)
      |           ^~~
a.cc:8:166: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                                                                                                                      ^
a.cc:4:26: error: expected ';' before ')' token
    4 | #define f for(i=0;i<m;i++)
      |                          ^
a.cc:8:166: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |                                                                                                                                                                      ^
a.cc:4:11: error: expected unqualified-id before 'for'
    4 | #define f for(i=0;i<m;i++)
      |           ^~~
a.cc:8:214: note: in expansion of macro 'f'
    8 | int main(){int i,n,m,p,y;P a[100010];cin>>n>>m;f cin>>p>>y,a[i].f.f=p,a[i].f.s=y,a[i].s.f=0,a[i].s.s=i;sort(a,a+m);p=a[0].f.f;f{if(p!=a[i].f.f)p=a[i].f.f,y=0;a[i].s.f=++y;}sort(a,a+m,c);f printf("%06d%06d\n",a[i].f.f,a[i].s.f);}
      |