답안 #197993

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
197993 2020-01-24T12:44:39 Z model_code Sob (COCI19_sob) C++17
110 / 110
90 ms 7288 KB
#include <bits/stdc++.h>
using namespace std;

#define TRACE(x) cerr << #x << " = " << x << endl
#define _ << " _ " <<

#define fi first
#define se second

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
  
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int n, m;
    cin >> n >> m;

    for (n--; n >= 0; ) {
        int x = m;
        while ((x & n) != n) x++;
        for (int i = x; i >= m; i--)
            cout << n-- << " " << i << "\n";
        m = x + 1;
    }

    return 0;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 46 ms 3960 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 47 ms 4088 KB Output is correct
7 Correct 23 ms 2116 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 3 ms 420 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 46 ms 3960 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Correct 47 ms 4088 KB Output is correct
11 Correct 23 ms 2116 KB Output is correct
12 Correct 2 ms 256 KB Output is correct
13 Correct 2 ms 376 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 2 ms 376 KB Output is correct
16 Correct 2 ms 376 KB Output is correct
17 Correct 2 ms 376 KB Output is correct
18 Correct 3 ms 420 KB Output is correct
19 Correct 11 ms 1020 KB Output is correct
20 Correct 36 ms 2936 KB Output is correct
21 Correct 3 ms 376 KB Output is correct
22 Correct 3 ms 348 KB Output is correct
23 Correct 50 ms 4128 KB Output is correct
24 Correct 90 ms 7288 KB Output is correct
25 Correct 85 ms 7116 KB Output is correct