Submission #653679

#TimeUsernameProblemLanguageResultExecution timeMemory
653679Koful123Sob (COCI19_sob)C++17
110 / 110
78 ms7216 KiB
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define int long long #define pb push_back #define ff first #define ss second #define mod 1000000007 #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() void solve(){ int n,m; cin >> n >> m; int cur = m,last = n; while(cur < m + n){ for(int j=last-1;j>=0;j--){ if(j == (j & cur)){ for(int k=j;k<last;k++,cur++){ cout << k << ' ' << cur << endl; } last = j; break; } } } } signed main(){ ios::sync_with_stdio(0); cin.tie(0); int t = 1; // cin >> t; while(t--) solve(); 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...