# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
199665 | SamAnd | Sob (COCI19_sob) | C++17 | 108 ms | 9336 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
const int N = 1000006;
int n, m;
int ans[N];
int main()
{
scanf("%d%d", &n, &m);
int j = m;
for (int i = n - 1; i >= 0; --i)
{
int k = j;
while ((j & i) != i)
{
++j;
}
int jj;
for (i = i, jj = j; jj >= k; --jj, --i)
ans[i] = jj;
++j;
++i;
}
for (int i = 0; i < n; ++i)
{
printf("%d %d\n", i, ans[i]);
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |