QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#540350#8726. Magic Showzzafanti0 0ms1868kbC++231.5kb2024-08-31 16:54:462024-08-31 16:54:52

Judging History

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

  • [2024-08-31 16:54:52]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:1868kb
  • [2024-08-31 16:54:46]
  • 提交

Alice

#include <vector>
#include "Alice.h"
#include<bits/stdc++.h>

// 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().

#define N 4964
#define P 73
using namespace std;
std::vector<std::pair<int,int>> Alice(){
  long long X=setN(N+1);

  vector<pair<int,int>> T;
  for(int i=1; i<=N/2; i++){
    int u=(i-1)%P;
    if(((i-1)/P+__builtin_popcount((i-1)/P)%2)&&(X>>u&1)||((i-1)/P+__builtin_popcount((i-1)/P)%2==0)&&(X>>(P-u-1)&1)) T.emplace_back(i,i*2+1);
    else T.emplace_back(i,i*2);
  }
  for(int i=N/2+1; i<=N; i++) T.emplace_back(i,i+1);
  assert(T.size()==N);
  return T;
}

Bob

#include <vector>
#include "Bob.h"
#include <bits/stdc++.h>

// 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().

using namespace std;
#define P 73
#define N 4964
long long Bob(std::vector<std::pair<int,int>> V){
  long long ret=0;
  for(auto pt:V){
    int x=(pt.first-1)%P,y=(pt.first-1)/P;
    if(pt.first>N/2) continue;
    if(pt.second==pt.first*2) continue;
    if((__builtin_popcount(y)+y)%2==0) ret|=(1ll<<(P-x-1));
    else ret|=(1ll<<x);
  }
  return ret;
}

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1864kb,1804kb

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4965
1 3
2 5
3 6
4 9
5 10
6 12
7 15
8 16
9 19
10 20
11 22
12 24
13 26
14 28
15 30
16 32
17 34
18 36
19 38
20 40
21 42
22 44
23 46
24 48
25 50
26 52
27 54
28 56
29 58
30 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4965
1 3
2 5
3 6
4 9
5 10
6 12
7 15
8 16
9 19
10 20
11 22
12 24
13 26
14 28
15 30
16 32
17 34
18 36
19 38
20 40
21 42
22 44
23 46
24 48
25 50
26 52
27 54
28 56
29 58
30 ...

output:

2
4965 2840
3 6
4 9
5 10
7 15
8 16
9 19
11 22
12 24
13 26
15 30
17 34
21 42
22 44
25 50
28 56
29 58
30 60
31 62
32 64
33 66
34 68
35 70
37 74
42 84
45 90
47 94
48 96
50 100
53 106
55 110
57 114
59 118
60 120
61 122
62 125
63 127
64 129
65 131
68 137
69 138
70 140
73 147
74 149
75 150
76 153
77 154
7...

input:

2
4965 2840
3 6
4 9
5 10
7 15
8 16
9 19
11 22
12 24
13 26
15 30
17 34
21 42
22 44
25 50
28 56
29 58
30 60
31 62
32 64
33 66
34 68
35 70
37 74
42 84
45 90
47 94
48 96
50 100
53 106
55 110
57 114
59 118
60 120
61 122
62 125
63 127
64 129
65 131
68 137
69 138
70 140
73 147
74 149
75 150
76 153
77 154
7...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Incorrect answer.

Subtask #2:

score: 0
Wrong Answer

Test #13:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1864kb,1808kb

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4965
1 2
2 4
3 7
4 9
5 10
6 13
7 15
8 16
9 18
10 20
11 22
12 24
13 26
14 28
15 30
16 32
17 34
18 36
19 38
20 40
21 42
22 44
23 46
24 48
25 50
26 52
27 54
28 56
29 58
30 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4965
1 2
2 4
3 7
4 9
5 10
6 13
7 15
8 16
9 18
10 20
11 22
12 24
13 26
14 28
15 30
16 32
17 34
18 36
19 38
20 40
21 42
22 44
23 46
24 48
25 50
26 52
27 54
28 56
29 58
30 ...

output:

2
4965 2840
3 7
4 9
5 10
7 15
8 16
9 18
11 22
12 24
13 26
15 30
17 34
21 42
22 44
25 50
28 56
29 58
30 60
31 62
32 64
33 66
34 68
35 70
37 74
42 84
45 90
47 94
48 96
50 100
53 106
55 110
57 114
59 118
60 121
61 122
62 125
63 126
64 129
65 130
68 137
69 138
70 141
73 146
74 148
75 150
76 153
77 155
7...

input:

2
4965 2840
3 7
4 9
5 10
7 15
8 16
9 18
11 22
12 24
13 26
15 30
17 34
21 42
22 44
25 50
28 56
29 58
30 60
31 62
32 64
33 66
34 68
35 70
37 74
42 84
45 90
47 94
48 96
50 100
53 106
55 110
57 114
59 118
60 121
61 122
62 125
63 126
64 129
65 130
68 137
69 138
70 141
73 146
74 148
75 150
76 153
77 155
7...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Incorrect answer.

Subtask #3:

score: 0
Wrong Answer

Test #25:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1868kb,1808kb

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4965
1 3
2 5
3 6
4 8
5 10
6 13
7 14
8 17
9 19
10 20
11 22
12 24
13 26
14 28
15 31
16 32
17 34
18 37
19 39
20 41
21 42
22 45
23 47
24 49
25 50
26 53
27 54
28 56
29 58
30 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4965
1 3
2 5
3 6
4 8
5 10
6 13
7 14
8 17
9 19
10 20
11 22
12 24
13 26
14 28
15 31
16 32
17 34
18 37
19 39
20 41
21 42
22 45
23 47
24 49
25 50
26 53
27 54
28 56
29 58
30 ...

output:

2
4965 2840
3 6
4 8
5 10
7 14
8 17
9 19
11 22
12 24
13 26
15 31
17 34
21 42
22 45
25 50
28 56
29 58
30 60
31 62
32 65
33 66
34 69
35 71
37 74
42 84
45 91
47 95
48 97
50 101
53 107
55 111
57 115
59 118
60 121
61 123
62 124
63 127
64 129
65 131
68 136
69 138
70 141
73 147
74 149
75 151
76 152
77 155
7...

input:

2
4965 2840
3 6
4 8
5 10
7 14
8 17
9 19
11 22
12 24
13 26
15 31
17 34
21 42
22 45
25 50
28 56
29 58
30 60
31 62
32 65
33 66
34 69
35 71
37 74
42 84
45 91
47 95
48 97
50 101
53 107
55 111
57 115
59 118
60 121
61 123
62 124
63 127
64 129
65 131
68 136
69 138
70 141
73 147
74 149
75 151
76 152
77 155
7...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Incorrect answer.