Submission #292365

#TimeUsernameProblemLanguageResultExecution timeMemory
292365kingfran1907Sob (COCI19_sob)C++14
110 / 110
99 ms7160 KiB
#include <bits/stdc++.h>
#define X first
#define Y second

using namespace std;
typedef long long llint;

const int maxn = 2e5+10;
const int base = 31337;
const int mod = 1e9+7;
const int inf = 0x3f3f3f3f;
const int logo = 20;
const int off = 1 << logo;
const int treesiz = off << 1;

int n, m;
int main() {
	scanf("%d%d", &n, &m);
 	n--;
	while (n >= 0) {
		int tren = m;
		while ((tren & n) != n) tren++;
		for (int i = tren; i >= m; i--) 
			printf("%d %d\n", n--, i);
		m = tren + 1;
	}
	return 0;
}

Compilation message (stderr)

sob.cpp: In function 'int main()':
sob.cpp:18:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   18 |  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...