QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#590492#8726. Magic Showisirazeev0 0ms1844kbC++201.7kb2024-09-26 01:00:292024-09-26 01:00:29

Judging History

你现在查看的是最新测评结果

  • [2024-09-26 01:00:29]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:1844kb
  • [2024-09-26 01:00:29]
  • 提交

Alice

#include <vector>
#include "Alice.h"

using namespace std;

// you may define some global variables, but it does not work if you try to transfer any information from function Alice() to function Bob() through these variables.
// you had better not use the same global variables in function Alice() and in function Bob().

std::vector<std::pair<int,int>> Alice(){
    const int N = 61 * 40 + 61;
    long long x = setN(N);
    vector<pair<int, int>> edges;
    int cnt[N + 1];
    for(int i = 0; i <= N; i++) cnt[i] = 0;
    for(int i = 1; i < 61; i++){
        edges.emplace_back(i, i + 1);
    }
    for(int bit = 60; bit >= 0; bit--){
        if(((x >> bit) & 1) == 1){
            for(int j = 62 + bit * 40; j < 62 + (bit + 1) * 40; j++){
                edges.emplace_back(bit + 1, j);
                cnt[j]++;
            }
        }
    }
    vector<int> v;
    for(int i = 62; i <= N; i++){
        if(cnt[i] == 0)
            v.emplace_back(i);
    }
    int non_zero = 0;
    for(int i = 62; i <= N; i++){
        if(cnt[i] != 0)
            non_zero = i;
    }
    for(int i : v){
        edges.emplace_back(i, non_zero);
    }
    return edges;
}

Bob

#include <vector>
#include "Bob.h"

using namespace std;

long long Bob(std::vector<std::pair<int,int>> V){
    const int N = 61 * 40 + 61;
    int cnt[N + 1];
    for(int i = 0; i <= N; i++) cnt[i] = 0;
    for(int i = 1; i < (int)V.size(); i++){
        pair<int, int> p = V[i];
        cnt[p.first]++, cnt[p.second]++;
    }
    int res = 0;
    for(int i = 1; i <= 61; i++){
        int bit = i - 1;
        if(cnt[i] > 0)
            res += (1 << bit);
    }
    return res;
}

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1844kb,1796kb

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
2501
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
2501
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
3...

output:

2
2501 1296
1 2
1 62
1 63
1 66
1 67
1 68
1 71
1 72
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 86
1 89
1 90
1 92
1 93
1 96
1 99
1 100
3 4
3 142
3 143
3 144
3 146
3 147
3 149
3 150
3 154
3 156
3 158
3 159
3 160
3 161
3 163
3 167
3 170
3 172
3 173
3 174
3 176
3 178
3 179
3 180
3 181
4 5
6 262
6 264
6 266
6 2...

input:

2
2501 1296
1 2
1 62
1 63
1 66
1 67
1 68
1 71
1 72
1 76
1 77
1 78
1 79
1 80
1 81
1 82
1 86
1 89
1 90
1 92
1 93
1 96
1 99
1 100
3 4
3 142
3 143
3 144
3 146
3 147
3 149
3 150
3 154
3 156
3 158
3 159
3 160
3 161
3 163
3 167
3 170
3 172
3 173
3 174
3 176
3 178
3 179
3 180
3 181
4 5
6 262
6 264
6 266
6 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
519969788

Subtask #2:

score: 0
Wrong Answer

Test #13:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1832kb,1792kb

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
2501
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
2501
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
3...

output:

2
2501 1296
1 2
3 4
3 142
3 143
3 145
3 146
3 147
3 148
3 149
3 152
3 156
3 157
3 160
3 161
3 162
3 163
3 166
3 168
3 169
3 171
3 172
3 173
3 174
3 176
3 179
4 5
4 182
4 183
4 184
4 186
4 187
4 188
4 189
4 190
4 191
4 192
4 193
4 196
4 197
4 202
4 203
4 205
4 206
4 207
4 208
4 211
4 212
4 213
4 214
...

input:

2
2501 1296
1 2
3 4
3 142
3 143
3 145
3 146
3 147
3 148
3 149
3 152
3 156
3 157
3 160
3 161
3 162
3 163
3 166
3 168
3 169
3 171
3 172
3 173
3 174
3 176
3 179
4 5
4 182
4 183
4 184
4 186
4 187
4 188
4 189
4 190
4 191
4 192
4 193
4 196
4 197
4 202
4 203
4 205
4 206
4 207
4 208
4 211
4 212
4 213
4 214
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
520010747

Subtask #3:

score: 0
Wrong Answer

Test #25:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1824kb,1792kb

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
2501
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
2501
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 20
20 21
21 22
22 23
23 24
24 25
25 26
26 27
27 28
28 29
29 30
30 31
3...

output:

2
2501 1296
1 2
1 63
1 65
1 68
1 69
1 70
1 71
1 72
1 76
1 77
1 78
1 80
1 81
1 83
1 84
1 85
1 86
1 88
1 89
1 91
1 92
1 93
1 94
1 95
1 96
1 98
2 103
2 104
2 105
2 106
2 107
2 108
2 111
2 113
2 115
2 118
2 119
2 120
2 124
2 127
2 128
2 129
2 130
2 133
2 135
2 137
2 138
2 139
2 140
2 141
3 4
4 5
4 182
4...

input:

2
2501 1296
1 2
1 63
1 65
1 68
1 69
1 70
1 71
1 72
1 76
1 77
1 78
1 80
1 81
1 83
1 84
1 85
1 86
1 88
1 89
1 91
1 92
1 93
1 94
1 95
1 96
1 98
2 103
2 104
2 105
2 106
2 107
2 108
2 111
2 113
2 115
2 118
2 119
2 120
2 124
2 127
2 128
2 129
2 130
2 133
2 135
2 137
2 138
2 139
2 140
2 141
3 4
4 5
4 182
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
536820702