func_code_string: #include <bits/stdc++.h>   using namespace std;   bool sorts(pair<long long, long long> a, pair<long long, long long> b) {     return a.second < b.second;   }   int main() {     long long n, m, k, t;     cin >> n >> m >> k >> t;     string s[3] = { Carrots ,  Kiwis ,  Grapes };     vector<pair<long long, long long>> vec;     for (long long i = 0; i < k; i++) {       long long a, b;       cin >> a >> b;       a--;       b--;       vec.push_back(make_pair((m * a + b), 1));     }     sort(vec.begin(), vec.end());     long long sum = 0;     for (long long i = 0; i < k; i++) {       vec[i].second += sum;       sum = vec[i].second;     }     for (int i = 0; i < t; i++) {       long long a, b;       cin >> a >> b;       a--;       b--;       long long num = m * a + b;       for (int j = 0; j < vec.size(); j++) {         if (vec[j].first == num) {           cout <<  Waste  << endl;           break;         } else {           if (num < vec[0].first) {             cout << s[num % 3] << endl;             break;           } else if (num < vec[j].first) {             cout << s[(num - vec[j - 1].second) % 3] << endl;             break;           } else {             if (num > vec[vec.size() - 1].first) {               cout << s[(num - vec[vec.size() - 1].second) % 3] << endl;               break;             }           }         }       }     }   }   