Submission #496071

#TimeUsernameProblemLanguageResultExecution timeMemory
496071ktkeremSob (COCI19_sob)C++17
110 / 110
70 ms7156 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef __int128 vll; typedef unsigned __int128 uvll; ll _i=0; #define ffn(x) _i=x #define llll pair<ll , ll> #define stitr set<ll>::iterator #define fora(y,x) for(ll y=_i;x>y;y++) #define pb push_back #define pf push_front #define debu cout << "hello\n" #define fi first #define sec second #define all(a) a.begin() , a.end() const ll limit = 1e13 + 7; const ll ous=1e5 + 5; const ll dx[4] = {0 , -1 , 1 , 0} , dy[4] = {1,0,0,-1}; void solve(){ ll n , m;cin >> n >> m; for(ll i = n-1 , l = m;i>=0;){ for(ll j = l;j<n+m;++j){ if((i&j) == i){ ll o = j; while(o>=l && ((o&i) == i)){ cout << i <<" " << o << "\n"; --i;--o; } l = j+1; break; } } } return;/**/ } signed main(){ ios_base::sync_with_stdio(false);cin.tie(NULL); ll 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...