Submission #442804

#TimeUsernameProblemLanguageResultExecution timeMemory
442804jesus_coconutSob (COCI19_sob)C++17
110 / 110
99 ms7192 KiB
#include <bits/stdc++.h> using namespace std; int mn; int match(int a, int b) { while (a >= 0 && b >= mn) { cout << a << ' ' << b << '\n'; --a; --b; } return a; } void solve() { int n, m; cin >> n >> m; mn = m; for (int i = n - 1; i >= 0;) { for (int j = m; j < m + n; ++j) { if ((i & j) == i) { i = match(i, j); mn = j + 1; } } } } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); 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...