func_code_string: #include <bits/stdc++.h>   using namespace std;   const double pi = 3.141592653589793238462643383;   int main() {     {       int n, m, k, t;       cin >> n >> m >> k >> t;       set<int> s;       ;       for (long long i = 0; i < k; i++) {         int a, b;         cin >> a >> b;         int id = (a - 1) * m + b;         s.insert(id);       };       for (long long i = 0; i < t; i++) {         int a, b;         cin >> a >> b;         int id = (a - 1) * m + b;         if (s.find(id) != s.end())           cout <<  Waste  << endl;         else {           auto it = lower_bound(s.begin(), s.end(), id);           int d = distance(s.begin(), it);           int val = (id - d) % 3;           if (val == 0)             cout <<  Grapes  << endl;           else if (val == 1)             cout <<  Carrots  << endl;           else             cout <<  Kiwis  << endl;         }       }     }   }   