Submission #254637

# Submission time Handle Problem Language Result Execution time Memory
254637 2020-07-30T11:36:38 Z MrRobot_28 Sob (COCI19_sob) C++17
110 / 110
90 ms 7416 KB
#include <bits/stdc++.h>
                  
using namespace std;

signed main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int n, m;
	cin >> n >> m;
	int n1 = n;
	n--;
	while(n >= 0)
	{
		int j = m;
		while((n & j) != n)
		{
			j++;
		}
		for(int k = j; k >= m; k--)
		{
			cout << n-- << " " << k << "\n";
		}
		m = j + 1;
	}
	return 0;
}

Compilation message

sob.cpp: In function 'int main()':
sob.cpp:11:6: warning: unused variable 'n1' [-Wunused-variable]
  int n1 = n;
      ^~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 47 ms 3960 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 1 ms 384 KB Output is correct
5 Correct 0 ms 384 KB Output is correct
6 Correct 47 ms 3960 KB Output is correct
7 Correct 23 ms 2040 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
4 Correct 1 ms 384 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 1 ms 384 KB Output is correct
7 Correct 1 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 47 ms 3960 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 0 ms 384 KB Output is correct
7 Correct 1 ms 384 KB Output is correct
8 Correct 1 ms 384 KB Output is correct
9 Correct 0 ms 384 KB Output is correct
10 Correct 47 ms 3960 KB Output is correct
11 Correct 23 ms 2040 KB Output is correct
12 Correct 0 ms 384 KB Output is correct
13 Correct 0 ms 384 KB Output is correct
14 Correct 0 ms 384 KB Output is correct
15 Correct 1 ms 384 KB Output is correct
16 Correct 1 ms 384 KB Output is correct
17 Correct 1 ms 384 KB Output is correct
18 Correct 1 ms 384 KB Output is correct
19 Correct 10 ms 1024 KB Output is correct
20 Correct 36 ms 3064 KB Output is correct
21 Correct 3 ms 384 KB Output is correct
22 Correct 1 ms 384 KB Output is correct
23 Correct 50 ms 4216 KB Output is correct
24 Correct 90 ms 7416 KB Output is correct
25 Correct 87 ms 7160 KB Output is correct