func_code_string: #include <bits/stdc++.h>   using namespace std;   const int INF = 0x3f3f3f3f;   const long long LINF = 0x3f3f3f3f3f3f3f3fLL;   const double EPS = 1e-8;   const int MOD = 1000000007;   const int dy[] = {1, 0, -1, 0}, dx[] = {0, -1, 0, 1};   int main() {     cin.tie(0);     ios::sync_with_stdio(false);     int h, w;     cin >> h >> w;     vector<int> y{1}, x{1};     int ue = 1, shita = h;     while (ue < shita) {       for (int ue_x = 1, shita_x = w; ue_x <= w && shita_x >= 0; --shita_x) {         y.emplace_back(shita);         x.emplace_back(shita_x);         ++ue_x;         if (ue_x <= w) {           y.emplace_back(ue);           x.emplace_back(ue_x);         }       }       ++ue;       --shita;       if (ue <= shita) {         y.emplace_back(ue);         x.emplace_back(1);       }     }     if (ue == shita) {       int hidari = 1, migi = w;       while (hidari < migi) {         y.emplace_back(ue);         x.emplace_back(migi);         ++hidari;         if (hidari < migi) {           y.emplace_back(ue);           x.emplace_back(hidari);         }         --migi;       }     }     set<pair<int, int> > st;     for (int i = (1); i < (y.size()); ++i)       st.emplace(y[i] - y[i - 1], x[i] - x[i - 1]);     if (st.size() < h * w - 1) assert(false);     for (int i = (0); i < (y.size()); ++i) cout << y[i] <<     << x[i] <<   n ;     return 0;   }   