Submission #199665

#TimeUsernameProblemLanguageResultExecution timeMemory
199665SamAndSob (COCI19_sob)C++17
110 / 110
108 ms9336 KiB
#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)

sob.cpp: In function 'int main()':
sob.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d", &n, &m);
     ~~~~~^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...