QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#540261#8726. Magic Showzzafanti0 0ms1872kbC++231.4kb2024-08-31 16:45:302024-08-31 16:45:30

Judging History

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

  • [2024-08-31 16:45:30]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:1872kb
  • [2024-08-31 16:45:30]
  • 提交

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 4977
#define P 63
using namespace std;
std::vector<std::pair<int,int>> Alice(){
  long long X=setN(N+2);

  vector<pair<int,int>> T;
  for(int i=1; i<=N; i++){
    int u=(i-1)%P;
    if(((i-1)/P%2)&&(X>>u&1)||((i-1)/P%3==0)&&(X>>(P-u-1)&1)) T.emplace_back(i,i+2);
    else T.emplace_back(i,i+1);
  }
  T.emplace_back(N+1,N+2);
  assert(T.size()==N+1);
  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 63
#define N 4977
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) continue;
    if(pt.second==pt.first+1) continue;
    if(y%2==0) ret|=(1ll<<(P-x-1));
    else ret|=(1ll<<x);
  }
  return ret;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

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

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4979
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
4979
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
4979 4045
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
15 16
16 17
17 18
22 23
23 24
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
43 44
45 46
46 47
47 48
49 50
50 51
51 52
52 54
53 55
54 56
55 57
56 58
58 60
61 63
62 63
63 65
65 66...

input:

2
4979 4045
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
15 16
16 17
17 18
22 23
23 24
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 40
40 41
41 42
43 44
45 46
46 47
47 48
49 50
50 51
51 52
52 54
53 55
54 56
55 57
56 58
58 60
61 63
62 63
63 65
65 66...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Incorrect answer.

Subtask #2:

score: 0
Wrong Answer

Test #13:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1872kb,1828kb

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4979
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
4979
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
4979 4045
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
15 16
16 17
17 18
22 23
23 24
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 41
40 41
41 42
43 44
45 46
46 48
47 48
49 50
50 52
51 52
52 54
53 54
54 56
55 56
56 57
58 60
61 63
62 63
63 64
65 66...

input:

2
4979 4045
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
15 16
16 17
17 18
22 23
23 24
25 26
26 27
27 28
28 29
29 30
30 31
31 32
32 33
33 34
34 35
35 36
36 37
37 38
38 39
39 41
40 41
41 42
43 44
45 46
46 48
47 48
49 50
50 52
51 52
52 54
53 54
54 56
55 56
56 57
58 60
61 63
62 63
63 64
65 66...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Incorrect answer.

Subtask #3:

score: 0
Wrong Answer

Test #25:

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

input:

1
355365355024496523

output:

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

input:

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

output:

2
4979 4045
1 2
2 3
3 4
4 5
5 7
6 7
7 8
8 10
9 11
10 12
11 12
12 14
15 16
16 18
17 18
22 24
23 24
25 27
26 28
27 28
28 30
29 30
30 31
31 32
32 33
33 35
34 35
35 37
36 37
37 39
38 40
39 41
40 42
41 42
43 45
45 47
46 48
47 49
49 50
50 52
51 53
52 53
53 55
54 56
55 57
56 58
58 59
61 62
62 64
63 65
65 6...

input:

2
4979 4045
1 2
2 3
3 4
4 5
5 7
6 7
7 8
8 10
9 11
10 12
11 12
12 14
15 16
16 18
17 18
22 24
23 24
25 27
26 28
27 28
28 30
29 30
30 31
31 32
32 33
33 35
34 35
35 37
36 37
37 39
38 40
39 41
40 42
41 42
43 45
45 47
46 48
47 49
49 50
50 52
51 53
52 53
53 55
54 56
55 57
56 58
58 59
61 62
62 64
63 65
65 6...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Incorrect answer.