func_code_string: #include <bits/stdc++.h>   using namespace std;   struct FlowEdge {     int to, cap, rev;     FlowEdge(int to_, int cap_, int rev_) : to(to_), cap(cap_), rev(rev_) {}   };   class FordFulkerson {    public:     FordFulkerson() {}     FordFulkerson(int n) : G(n), used(n) {}     void add(int from, int to, int cap) {       G[from].emplace_back(to, cap, (int)G[to].size());       G[to].emplace_back(from, 0, (int)G[from].size() - 1);     }     int get(int s, int t) {       int f = 1, res = 0;       while (f) {         fill(begin(used), end(used), false);         f = dfs(s, t, INT_MAX);         res += f;       }       return res;     }       private:     vector<vector<FlowEdge>> G;     vector<bool> used;     int dfs(int v, int t, int f) {       if (v == t) return f;       used[v] = 1;       for (auto &e : G[v]) {         if (!used[e.to] && e.cap > 0) {           int d = dfs(e.to, t, min(e.cap, f));           if (d > 0) {             e.cap -= d;             G[e.to][e.rev].cap += d;             return d;           }         }       }       return 0;     }   };   const string T =  fair n , F =  unfair n ;   const int MAXV = 20099, SRC = 0, QUERY = 10001, SINK = 20010, MOD5 = 20001;   int N, B, Q, upTo[10099], quantity[10099];   pair<int, int> query[10099];   int main() {     ios::sync_with_stdio(0);     cin.tie(0);     cin >> N >> B >> Q;     for (int i = 0; i < (int)Q; ++i) cin >> upTo[i] >> quantity[i];     for (int i = 0; i < (int)Q; ++i) query[i] = make_pair(upTo[i], quantity[i]);     query[Q] = make_pair(0, 0);     query[Q] = make_pair(B, N);     Q += 2;     sort(query, query + Q);     FordFulkerson flowG(MAXV);     for (int i = 0; i < (int)5; ++i) flowG.add(SRC, MOD5 + i, N / 5);     for (int num = 1; num < (int)B + 1; ++num) {       int mod5 = num % 5;       flowG.add(MOD5 + mod5, num, 1);     }     for (int i = 0; i < (int)Q - 1; ++i) {       int lef = query[i].first, rig = query[i + 1].first;       int cnt = query[i + 1].second - query[i].second;       if (cnt < 0) {         cout << F;         return 0;       }       for (int num = lef + 1; num <= rig; ++num) {         flowG.add(num, QUERY + i, 1);       }       flowG.add(QUERY + i, SINK, cnt);     }     int maxFlow = flowG.get(SRC, SINK);     cout << (maxFlow == N ? T : F);   }   