Submission #498086

#TimeUsernameProblemLanguageResultExecution timeMemory
498086asandikciSob (COCI19_sob)C++17
110 / 110
82 ms7156 KiB
#include"iostream" // #include"vector" // #include"queue" // #include"deque" // #include"set" // #include"map" // #include"algorithm" // #include"iomanip" // #include"cstring" // #include"cmath" // #include"bitset" // #define int long long // __LINE__ using namespace std; void solve(){ int n,m; cin >> n >> m; int last=m; for(int i=n-1;i>=0;){ for(int j=last;last<n+m;j++){ if((i&j)==i){ int tmp = j; while(tmp>=last && (tmp&i)==i){ cout << i << " " << tmp << "\n"; i--; tmp--; } last=j+1; break; } } } } signed main(){ ios::sync_with_stdio(false); cin.tie(0); // freopen("","r",stdin);freopen("","w",stdout); int t=1; // cin >> t; for(int i=1;i<=t;i++){ // cout << "Case " << i << ":\n"; solve(); // cout <<"\n\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...