#include<bits/stdc++.h>
#define ll long long int
#define no cout << "NO" << endl
#define yes cout << "YES" << endl
using namespace std;
int main()
{
int n,m;
cin >> n >> m;
int x = n-1, y = m;
while(x>=0)
{
int lst = y;
while((x&y)!= x)y++;
int tmp = y;
while(tmp >=lst) cout << x-- << " " << tmp-- << endl;
y++;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |