Language: C++

#include <bits/stdc++.h> 
using namespace std; 
#define INF 1001000100010001000 
#define MOD 1000000007 
#define EPS 1e-10 
#define int long long 
#define rep(i, N) for (int i = 0; i < N; i++) 
#define Rep(i, N) for (int i = 1; i < N; i++) 
#define For(i, a, b) for (int i = (a); i < (b); i++) 
#define pb push_back 
#define eb emplace_back 
#define mp make_pair 
#define i_i pair<int, int> 
#define vi vector<int> 
#define vvi vector<vi > 
#define vb vector<bool> 
#define vvb vector<vb > 
#define vp vector< i_i > 
#define all(a) (a).begin(), (a).end() 
#define Int(x) int x; cin >> x; 
#define int2(x, y) Int(x); Int(y); 
#define int3(x, y, z) Int(x); int2(y, z); 
#define fir first #define sec second 
#define ffir first.first 
#define fsec first.second 
#define sfir second.first 
#define ssec second.second 
#define Decimal fixed << setprecision(10) 

//int dxy[5] = {0, 1, 0, -1, 0}; 
// BIT avl cusum dijkstra dinic geo2 gin graph kruskal lca lcm matrix ncm next_combination segtree st tmp topcoder uf vi 

signed main() { std::ios::sync_with_stdio(false); std::cin.tie(0); 
int2(n, m); vp kyoko(n); 
rep(i, n) { kyoko[i].fir = kyoko[i].sec = i; // min, max 
} vp yui(m); 

rep(i, m) { int2(a, b); yui[i] = {a, b}; } sort(all(yui)); 

rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; } 





Compiler output:
a.cc:23:19: error: stray '#' in program
   23 | #define fir first #define sec second
      |                   ^
a.cc:35:22: note: in expansion of macro 'fir'
   35 | rep(i, n) { kyoko[i].fir = kyoko[i].sec = i; // min, max
      |                      ^~~
a.cc:23:19: error: stray '#' in program
   23 | #define fir first #define sec second
      |                   ^
a.cc:40:57: note: in expansion of macro 'fir'
   40 | rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; }
      |                                                         ^~~
a.cc:23:19: error: stray '#' in program
   23 | #define fir first #define sec second
      |                   ^
a.cc:40:74: note: in expansion of macro 'fir'
   40 | rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; }
      |                                                                          ^~~
a.cc:23:19: error: stray '#' in program
   23 | #define fir first #define sec second
      |                   ^
a.cc:40:97: note: in expansion of macro 'fir'
   40 | rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; }
      |                                                                                                 ^~~
a.cc:23:19: error: stray '#' in program
   23 | #define fir first #define sec second
      |                   ^
a.cc:40:113: note: in expansion of macro 'fir'
   40 | rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; }
      |                                                                                                                 ^~~
a.cc:23:19: error: stray '#' in program
   23 | #define fir first #define sec second
      |                   ^
a.cc:40:228: note: in expansion of macro 'fir'
   40 | rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; }
      |                                                                                                                                                                                                                                    ^~~
a.cc:23:19: error: stray '#' in program
   23 | #define fir first #define sec second
      |                   ^
a.cc:40:288: note: in expansion of macro 'fir'
   40 | rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; }
      |                                                                                                                                                                                                                                                                                                ^~~
a.cc: In function 'int main()':
a.cc:23:20: error: expected ';' before 'define'
   23 | #define fir first #define sec second
      |                    ^~~~~~
a.cc:35:22: note: in expansion of macro 'fir'
   35 | rep(i, n) { kyoko[i].fir = kyoko[i].sec = i; // min, max
      |                      ^~~
a.cc:40:39: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'struct std::pair<long long int, long long int>'} has no member named 'sec'
   40 | rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; }
      |                                       ^~~
a.cc:23:20: error: expected ';' before 'define'
   23 | #define fir first #define sec second
      |                    ^~~~~~
a.cc:40:57: note: in expansion of macro 'fir'
   40 | rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; }
      |                                                         ^~~
a.cc:40:132: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'struct std::pair<long long int, long long int>'} has no member named 'sec'
   40 | rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; }
      |                                                                                                                                    ^~~
a.cc:40:149: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'struct std::pair<long long int, long long int>'} has no member named 'sec'
   40 | rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; }
      |                                                                                                                                                     ^~~
a.cc:40:172: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'struct std::pair<long long int, long long int>'} has no member named 'sec'
   40 | rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; }
      |                                                                                                                                                                            ^~~
a.cc:40:188: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'struct std::pair<long long int, long long int>'} has no member named 'sec'
   40 | rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; }
      |                                                                                                                                                                                            ^~~
a.cc:40:213: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'struct std::pair<long long int, long long int>'} has no member named 'sec'
   40 | rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; }
      |                                                                                                                                                                                                                     ^~~
a.cc:40:273: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'struct std::pair<long long int, long long int>'} has no member named 'sec'
   40 | rep(i, yui.size()) { int tmp = yui[i].sec; kyoko[tmp-1].fir = kyoko[tmp].fir = min(kyoko[tmp-1].fir, kyoko[tmp].fir); kyoko[tmp-1].sec = kyoko[tmp].sec = max(kyoko[tmp-1].sec, kyoko[tmp].sec); } cout << kyoko[0].sec - kyoko[0].fir + 1; Rep(i, n) { cout << " " << kyoko[i].sec - kyoko[i].fir + 1; } cout << endl; return 0; }
      |