# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
601452 | czhang2718 | Sob (COCI19_sob) | C++17 | 68 ms | 7116 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "bits/stdc++.h"
using namespace std;
int n, m;
int main(){
cin.tie(0)->sync_with_stdio(0);
cin >> n >> m;
int j=m;
int i=n-1;
int k=0;
while(i>=0){
int j2=j;
while((j2&i)!=i) j2++;
int d=j2-i;
for(int k=j; k<=j2; k++){
cout << k-d << " " << k << "\n";
}
i-=j2-j+1;
j=j2+1;
}
}
Compilation message (stderr)
# | 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... |