QOJ.ac

QOJ

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

Judging History

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

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

Alice

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

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);
    }
    reverse(edges.begin(), edges.end());
    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: 1840kb,1800kb

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
2501
2501 541
2500 541
2499 541
2498 541
2497 541
2496 541
2495 541
2494 541
2493 541
2492 541
2491 541
2490 541
2489 541
2488 541
2487 541
2486 541
2485 541
2484 541
24...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
2501
2501 541
2500 541
2499 541
2498 541
2497 541
2496 541
2495 541
2494 541
2493 541
2492 541
2491 541
2490 541
2489 541
2488 541
2487 541
2486 541
2485 541
2484 541
24...

output:

2
2501 1615
1 2
1 65
1 66
1 67
1 68
1 69
1 71
1 73
1 74
1 76
1 77
1 78
1 79
1 81
1 83
1 85
1 86
1 88
1 89
1 90
1 92
1 95
1 96
1 98
1 99
1 100
2 3
3 4
3 143
3 144
3 148
3 149
3 152
3 155
3 158
3 159
3 161
3 162
3 163
3 164
3 166
3 169
3 170
3 171
3 173
3 174
3 177
3 179
3 180
4 5
5 6
6 7
6 264
6 265
...

input:

2
2501 1615
1 2
1 65
1 66
1 67
1 68
1 69
1 71
1 73
1 74
1 76
1 77
1 78
1 79
1 81
1 83
1 85
1 86
1 88
1 89
1 90
1 92
1 95
1 96
1 98
1 99
1 100
2 3
3 4
3 143
3 144
3 148
3 149
3 152
3 155
3 158
3 159
3 161
3 162
3 163
3 164
3 166
3 169
3 170
3 171
3 173
3 174
3 177
3 179
3 180
4 5
5 6
6 7
6 264
6 265
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
134021118

Subtask #2:

score: 0
Wrong Answer

Test #13:

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

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
2501
2501 1061
2500 1061
2499 1061
2498 1061
2497 1061
2496 1061
2495 1061
2494 1061
2493 1061
2492 1061
2491 1061
2490 1061
2489 1061
2488 1061
2487 1061
2486 1061
2485...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
2501
2501 1061
2500 1061
2499 1061
2498 1061
2497 1061
2496 1061
2495 1061
2494 1061
2493 1061
2492 1061
2491 1061
2490 1061
2489 1061
2488 1061
2487 1061
2486 1061
2485...

output:

2
2501 1615
1 2
2 3
3 4
3 142
3 143
3 144
3 146
3 147
3 149
3 150
3 152
3 153
3 154
3 155
3 160
3 161
3 163
3 164
3 168
3 169
3 172
3 174
3 178
3 179
4 5
4 182
4 183
4 186
4 187
4 188
4 189
4 191
4 193
4 194
4 195
4 196
4 198
4 199
4 200
4 201
4 202
4 203
4 204
4 210
4 211
4 217
4 218
4 219
4 220
4 ...

input:

2
2501 1615
1 2
2 3
3 4
3 142
3 143
3 144
3 146
3 147
3 149
3 150
3 152
3 153
3 154
3 155
3 160
3 161
3 163
3 164
3 168
3 169
3 172
3 174
3 178
3 179
4 5
4 182
4 183
4 186
4 187
4 188
4 189
4 191
4 193
4 194
4 195
4 196
4 198
4 199
4 200
4 201
4 202
4 203
4 204
4 210
4 211
4 217
4 218
4 219
4 220
4 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
134021117

Subtask #3:

score: 0
Wrong Answer

Test #25:

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

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
2501
2501 2421
2500 2421
2499 2421
2498 2421
2497 2421
2496 2421
2495 2421
2494 2421
2493 2421
2492 2421
2491 2421
2490 2421
2489 2421
2488 2421
2487 2421
2486 2421
2485...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
2501
2501 2421
2500 2421
2499 2421
2498 2421
2497 2421
2496 2421
2495 2421
2494 2421
2493 2421
2492 2421
2491 2421
2490 2421
2489 2421
2488 2421
2487 2421
2486 2421
2485...

output:

2
2501 1615
1 2
1 63
1 64
1 66
1 69
1 71
1 76
1 77
1 78
1 79
1 80
1 82
1 83
1 84
1 85
1 86
1 88
1 89
1 91
1 94
1 95
1 96
1 97
1 99
1 100
1 101
2 3
2 102
2 103
2 104
2 105
2 108
2 109
2 110
2 113
2 114
2 116
2 117
2 118
2 121
2 122
2 123
2 126
2 129
2 130
2 132
2 134
2 135
2 136
2 137
2 139
3 4
4 5
4...

input:

2
2501 1615
1 2
1 63
1 64
1 66
1 69
1 71
1 76
1 77
1 78
1 79
1 80
1 82
1 83
1 84
1 85
1 86
1 88
1 89
1 91
1 94
1 95
1 96
1 97
1 99
1 100
1 101
2 3
2 102
2 103
2 104
2 105
2 108
2 109
2 110
2 113
2 114
2 116
2 117
2 118
2 121
2 122
2 123
2 126
2 129
2 130
2 132
2 134
2 135
2 136
2 137
2 139
3 4
4 5
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
134152190