Submission #1257126

#TimeUsernameProblemLanguageResultExecution timeMemory
1257126rpthirsterSob (COCI19_sob)C++20
110 / 110
337 ms7296 KiB
#include <bits/stdc++.h> using namespace std; #define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define lo long long #define fi first #define se second lo n,m,a; bool used[1000005]; int main() { fio(); cin >> n >> m; a = m; for(int i=n-1; i>=0; i--){ while((i & a) != i){ //cout << i << " " << a << endl; a++; } cout << i << " " << a << endl; int temp = a+1; while((a != m) && (i != 0)){ cout << --i << " " << --a << endl; } a = temp; m = temp; } 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...