제출 #197993

#제출 시각아이디문제언어결과실행 시간메모리
197993model_codeSob (COCI19_sob)C++17
110 / 110
90 ms7288 KiB
#include <bits/stdc++.h>
using namespace std;

#define TRACE(x) cerr << #x << " = " << x << endl
#define _ << " _ " <<

#define fi first
#define se second

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
  
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int n, m;
    cin >> n >> m;

    for (n--; n >= 0; ) {
        int x = m;
        while ((x & n) != n) x++;
        for (int i = x; i >= m; i--)
            cout << n-- << " " << i << "\n";
        m = x + 1;
    }

    return 0;
}

#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...