Submission #253750

#TimeUsernameProblemLanguageResultExecution timeMemory
253750BruteforcemanSob (COCI19_sob)C++11
110 / 110
89 ms7160 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n, m; scanf("%d %d", &n, &m); int cur = m; int i = n - 1; while(i >= 0) { int start = cur; while((cur & i) != i) { ++cur; } int j = cur; while(j >= start) { printf("%d %d\n", i, j); i -= 1; j -= 1; } cur += 1; } return 0; }

Compilation message (stderr)

sob.cpp: In function 'int main()':
sob.cpp:6:8: 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...