제출 #768085

#제출 시각아이디문제언어결과실행 시간메모리
768085FilyaExamination (JOI19_examination)C++14
100 / 100
242 ms30044 KiB
//♥God will make a way♥ //#include <bits/stdc++.h> #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <string> #include <algorithm> #include <cmath> #include <cstring> #include <cassert> #include <set> #include <map> #include <unordered_map> #include <vector> #include <stack> #include <queue> #include <iomanip> #include <bitset> #include <stdio.h> #include <climits> #include <numeric> using namespace std; //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> //using namespace __gnu_pbds; //template <typename T> //using ordered_set = tree <T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; /////////////////////define///////////////////// #define ci(x) if(x) cout << "YES" << '\n'; else cout << "NO" << '\n'; #define cii(x) if(check(x)) #define MOD 1000000007 #define MOD2 998244353 #define oo 1e9 #define ool 1e18L #define pii pair<int, int> #define pll pair<long long, long long> #define mii map<int, int> #define vi vector<int> #define vpi vector<pair<int, int>> #define vll vector <ll> #define ff first #define ss second #define mp make_pair #define ll long long #define ld long double #define pb push_back #define eb emplace_back #define pob pop_back #define lb lower_bound #define ub upper_bound #define bs binary_search #define sz(x) (int((x).size())) #define all(x) (x).begin(), (x).end() #define alll(x) (x), (x) + n #define clr(x) (x).clear(); #define fri(x) for(int i = 0; i < x; ++i) #define frj(x) for(int j = 0; j < x; ++j) #define frp(x) for(int p = 0; p < x; ++p) #define frr(a, b) for(int i = a; i < b; ++i) #define frrj(a, b) for(int j = a; j < b; ++j) #define fra(x) for(int i = 0; i < x; ++i) cin >> a[i]; #define frb(x) for(int i = 0; i < x; ++i) cin >> b[i]; #define frs(x) for(auto it = x.begin(); it != x.end(); ++it) #define fr(x) for(auto it : x) //el #define fastio ios_base::sync_with_stdio(false); cin.tie(0); #define dbg(x) cerr << #x << ": " << x << endl; #define ce(x) cout << x << endl; #define uniq(x) x.resize(unique(all(x)) - x.begin()); //make all one after sorting #define blt __builtin_popcount /////////////////////print array, vector, deque, set, multiset, pair, map ///////////////////// void print(long long t) {cerr << t;} void print(int t) {cerr << t;} void print(string t) {cerr << t;} void print(char t) {cerr << t;} void print(double t) {cerr << t;} void print(long double t) {cerr << t;} void print(unsigned long long t) {cerr << t;} template <class T, class V> void print(pair <T, V> p) {cerr << "{"; print(p.first); cerr << ","; print(p.second); cerr << "}";} template <class T, class V> void print(T v[],V n) {cerr << "["; for(int i = 0; i < n; i++) {print(v[i]); cerr << " "; } cerr << "]"; cout << endl;} template <class T> void print(vector <T> v) {cerr << "[ "; for (T i : v) {print(i); cerr << " ";} cerr << "]"; cout << endl;} template <class T> void print(set <T> v) {cerr << "[ "; for (T i : v) {print(i); cerr << " ";} cerr << "]"; cout << endl;} template <class T> void print(multiset <T> v) {cerr << "[ "; for (T i : v) {print(i); cerr << " ";} cerr << "]"; cout << endl;} template <class T> void print(stack <T> v) {cerr << "[ "; stack<T> s = v; while(s.size()) {T i = s.top(); print(i); s.pop(); cerr << " ";} cerr << "]"; cout << endl;} template <class T> void print(queue <T> v) {cerr << "[ "; queue<T> s = v; while(s.size()) {T i = s.front(); print(i); s.pop(); cerr << " ";} cerr << "]"; cout << endl;} template <class T> void print(deque <T> v) {cerr << "[ "; deque<T> s = v; while(s.size()) {T i = s.front(); print(i); s.pop_front(); cerr << " ";} cerr << "]"; cout << endl;} template <class T, class V> void print(map <T, V> v) {cerr << "[ "; for (auto i : v) {print(i); cerr << " ";} cerr << "]"; cout << endl;} template <class T, class V> void print(unordered_map <T, V> v) {cerr << "[ "; for (auto i : v) {print(i); cerr << " ";} cerr << "]"; cout << endl;} /////////////////////code///////////////////// pii a[200005]; pair<pii, pii> b[200005]; int ans[200005]; struct segtree { vector <long long> tree; int size = 1; void init(int n) { //make tree while(size < n) size *= 2; tree.assign(2 * size - 1, 0); } void build(vector<int> &a, int x, int lx, int rx) { if(rx - lx == 1) { if(lx < a.size()) tree[x] = a[lx]; } else { int m = (lx + rx) / 2; build(a, 2 * x + 1, lx, m); build(a, 2 * x + 2, m, rx); tree[x] = tree[2 * x + 1] + tree[2 * x + 2]; } } void build(vector<int> &a) { init(a.size()); build(a, 0, 0, size); } void set(int i, int v, int x, int lx, int rx) { if(rx - lx == 1) { tree[x] += v; return; } int m = (lx + rx) / 2; if(i < m) set(i, v, 2 * x + 1, lx, m); else set(i, v, 2 * x + 2, m, rx); tree[x] = tree[2 * x + 1] + tree[2 * x + 2]; } void set(int i, int v) { //set i-th to v set(i, v, 0, 0, size); } long long sum(int l, int r, int x, int lx, int rx) { if(l >= rx || lx >= r) return 0; if(lx >= l && rx <= r) return tree[x]; int m = (lx + rx) / 2; return sum(l, r, 2 * x + 1, lx, m) + sum(l, r, 2 * x + 2, m, rx); } long long sum(int l, int r) { return sum(l, r, 0, 0, size); } } fx, fy; struct event{ int x, y, z, id, type; bool operator<(event other){ if(z == other.z) return (type < other.type); return z > other.z; } }; vector<event> v; int main() { fastio; int n, q, x, y, z; cin >> n >> q; vi compress; fri(n) { cin >> x >> y; v.pb({x, y, x+y, 0, 0}); compress.pb(x); compress.pb(y); } int maxi = 400001; fx.init(maxi+1); fy.init(maxi+1); fri(q) { cin >> x >> y >> z; v.pb({x, y, max(x+y, z), i, 1}); compress.pb(x); compress.pb(y); } sort(all(v)); sort(all(compress)); uniq(compress); int cnt = 0; fri(v.size()) { v[i].x = lb(all(compress), v[i].x) - compress.begin(); v[i].y = lb(all(compress), v[i].y) - compress.begin(); } for(auto it : v) { if(it.type) { //a miavorac b = a+b - a hatac b ans[it.id] = fx.sum(it.x, maxi) + fy.sum(it.y, maxi) - cnt; } else { cnt++; fx.set(it.x, 1); fy.set(it.y, 1); } } fri(q) cout << ans[i] << '\n'; }

컴파일 시 표준 에러 (stderr) 메시지

examination.cpp: In member function 'void segtree::build(std::vector<int>&, int, int, int)':
examination.cpp:101:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  101 |             if(lx < a.size()) tree[x] = a[lx];
      |                ~~~^~~~~~~~~~
examination.cpp: In function 'int main()':
examination.cpp:56:33: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<event>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   56 | #define fri(x) for(int i = 0; i < x; ++i)
      |                               ~~^~~~~~~~~
   57 | #define frj(x) for(int j = 0; j < x; ++j)
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   58 | #define frp(x) for(int p = 0; p < x; ++p)
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   59 | #define frr(a, b) for(int i = a; i < b; ++i)
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   60 | #define frrj(a, b) for(int j = a; j < b; ++j)
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   61 | #define fra(x) for(int i = 0; i < x; ++i) cin >> a[i];
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   62 | #define frb(x) for(int i = 0; i < x; ++i) cin >> b[i];
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   63 | #define frs(x) for(auto it = x.begin(); it != x.end(); ++it)
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   64 | #define fr(x) for(auto it : x) //el
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   65 | #define fastio ios_base::sync_with_stdio(false); cin.tie(0);
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   66 | #define dbg(x) cerr << #x << ": " << x << endl;
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   67 | #define ce(x) cout << x << endl;
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
   68 | #define uniq(x) x.resize(unique(all(x)) - x.begin()); //make all one after sorting
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   69 | #define blt __builtin_popcount
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
   70 | /////////////////////print array, vector, deque, set, multiset, pair, map /////////////////////
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   71 | void print(long long t) {cerr << t;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 | void print(int t) {cerr << t;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
   73 | void print(string t) {cerr << t;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   74 | void print(char t) {cerr << t;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
   75 | void print(double t) {cerr << t;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   76 | void print(long double t) {cerr << t;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   77 | void print(unsigned long long t) {cerr << t;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   78 | template <class T, class V> void print(pair <T, V> p) {cerr << "{"; print(p.first); cerr << ","; print(p.second); cerr << "}";}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   79 | template <class T, class V> void print(T v[],V n) {cerr << "["; for(int i = 0; i < n; i++) {print(v[i]); cerr << " "; } cerr << "]"; cout << endl;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   80 | template <class T> void print(vector <T> v) {cerr << "[ "; for (T i : v) {print(i); cerr << " ";} cerr << "]"; cout << endl;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   81 | template <class T> void print(set <T> v) {cerr << "[ "; for (T i : v) {print(i); cerr << " ";} cerr << "]"; cout << endl;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   82 | template <class T> void print(multiset <T> v) {cerr << "[ "; for (T i : v) {print(i); cerr << " ";} cerr << "]"; cout << endl;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   83 | template <class T> void print(stack <T> v) {cerr << "[ "; stack<T> s = v; while(s.size()) {T i = s.top(); print(i); s.pop(); cerr << " ";} cerr << "]"; cout << endl;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   84 | template <class T> void print(queue <T> v) {cerr << "[ "; queue<T> s = v; while(s.size()) {T i = s.front(); print(i); s.pop(); cerr << " ";} cerr << "]"; cout << endl;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   85 | template <class T> void print(deque <T> v) {cerr << "[ "; deque<T> s = v; while(s.size()) {T i = s.front(); print(i); s.pop_front(); cerr << " ";} cerr << "]"; cout << endl;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   86 | template <class T, class V> void print(map <T, V> v) {cerr << "[ "; for (auto i : v) {print(i); cerr << " ";} cerr << "]"; cout << endl;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   87 | template <class T, class V> void print(unordered_map <T, V> v) {cerr << "[ "; for (auto i : v) {print(i); cerr << " ";} cerr << "]"; cout << endl;}
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   88 | /////////////////////code/////////////////////
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   89 | pii a[200005];
      | ~~~~~~~~~~~~~~                   
   90 | pair<pii, pii> b[200005];
      | ~~~~~~~~~~~~~~~~~~~~~~~~~        
   91 | int ans[200005];
      | ~~~~~~~~~~~~~~~~                 
   92 | struct segtree {
      | ~~~~~~~~~~~~~~~~                 
   93 |     vector <long long> tree;
      |     ~~~~~~~~~~~~~~~~~~~~~~~~     
   94 |     int size = 1;
      |     ~~~~~~~~~~~~~                
   95 |     void init(int n) { //make tree
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   96 |         while(size < n) size *= 2;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~
   97 |         tree.assign(2 * size - 1, 0);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   98 |     }
      |     ~                            
   99 |     void build(vector<int> &a, int x, int lx, int rx) {
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  100 |         if(rx - lx == 1) {
      |         ~~~~~~~~~~~~~~~~~~       
  101 |             if(lx < a.size()) tree[x] = a[lx];
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  102 |         }
      |         ~                        
  103 |         else {
      |         ~~~~~~                   
  104 |             int m = (lx + rx) / 2;
      |             ~~~~~~~~~~~~~~~~~~~~~~
  105 |             build(a, 2 * x + 1, lx, m);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  106 |             build(a, 2 * x + 2, m, rx);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  107 |             tree[x] = tree[2 * x + 1] + tree[2 * x + 2];
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  108 |         }
      |         ~                        
  109 |     }
      |     ~                            
  110 |     void build(vector<int> &a) {
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  111 |         init(a.size());
      |         ~~~~~~~~~~~~~~~          
  112 |         build(a, 0, 0, size);
      |         ~~~~~~~~~~~~~~~~~~~~~    
  113 |     }
      |     ~                            
  114 |     void set(int i, int v, int x, int lx, int rx) {
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  115 |         if(rx - lx == 1) {
      |         ~~~~~~~~~~~~~~~~~~       
  116 |             tree[x] += v;
      |             ~~~~~~~~~~~~~        
  117 |             return;
      |             ~~~~~~~              
  118 |         }
      |         ~                        
  119 |         int m = (lx + rx) / 2;
      |         ~~~~~~~~~~~~~~~~~~~~~~   
  120 |         if(i < m) set(i, v, 2 * x + 1, lx, m);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  121 |         else set(i, v, 2 * x + 2, m, rx);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  122 |         tree[x] = tree[2 * x + 1] + tree[2 * x + 2];
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  123 |     }
      |     ~                            
  124 |     void set(int i, int v) { //set i-th to v
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  125 |         set(i, v, 0, 0, size);
      |         ~~~~~~~~~~~~~~~~~~~~~~   
  126 |     }
      |     ~                            
  127 |     long long sum(int l, int r, int x, int lx, int rx) {
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  128 |         if(l >= rx || lx >= r) return 0;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  129 |         if(lx >= l && rx <= r) return tree[x];
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  130 |         int m = (lx + rx) / 2;
      |         ~~~~~~~~~~~~~~~~~~~~~~   
  131 |         return sum(l, r, 2 * x + 1, lx, m) + sum(l, r, 2 * x + 2, m, rx);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  132 |     }
      |     ~                            
  133 |     long long sum(int l, int r) {
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  134 |         return sum(l, r, 0, 0, size);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  135 |     }
      |     ~                            
  136 | } fx, fy;
      | ~~~~~~~~~                        
  137 | struct event{
      | ~~~~~~~~~~~~~                    
  138 |     int x, y, z, id, type;
      |     ~~~~~~~~~~~~~~~~~~~~~~       
  139 |     bool operator<(event other){
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  140 |         if(z == other.z) return (type < other.type);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  141 |         return z > other.z;
      |         ~~~~~~~~~~~~~~~~~~~      
  142 |     }
      |     ~                            
  143 | };
      | ~~                               
  144 | vector<event> v;
      | ~~~~~~~~~~~~~~~~                 
  145 | int main() {
      | ~~~~~~~~~~~~                     
  146 |     fastio;
      |     ~~~~~~~                      
  147 |     int n, q, x, y, z; cin >> n >> q;
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  148 |     vi compress;
      |     ~~~~~~~~~~~~                 
  149 |     fri(n) {
      |     ~~~~~~~~                     
  150 |         cin >> x >> y;
      |         ~~~~~~~~~~~~~~           
  151 |         v.pb({x, y, x+y, 0, 0});
      |         ~~~~~~~~~~~~~~~~~~~~~~~~ 
  152 |         compress.pb(x); compress.pb(y);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  153 |     }
      |     ~                            
  154 |     int maxi = 400001;
      |     ~~~~~~~~~~~~~~~~~~           
  155 |     fx.init(maxi+1); fy.init(maxi+1);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  156 |     fri(q) {
      |     ~~~~~~~~                     
  157 |         cin >> x >> y >> z;
      |         ~~~~~~~~~~~~~~~~~~~      
  158 |         v.pb({x, y, max(x+y, z), i, 1});
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  159 |         compress.pb(x); compress.pb(y);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  160 |     }
      |     ~                            
  161 |     sort(all(v));
      |     ~~~~~~~~~~~~~                
  162 |     sort(all(compress)); uniq(compress);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  163 |     int cnt = 0;
      |     ~~~~~~~~~~~~                 
  164 |     fri(v.size()) {
      |     ~~~~~~~~~~~~                 
examination.cpp:164:5: note: in expansion of macro 'fri'
  164 |     fri(v.size()) {
      |     ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...