QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#127324#5191. 混乱邪恶tytytyWA 224ms7940kbC++141.4kb2023-07-19 15:47:252023-07-19 15:47:26

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-19 15:47:26]
  • 评测
  • 测评结果:WA
  • 用时:224ms
  • 内存:7940kb
  • [2023-07-19 15:47:25]
  • 提交

answer

#include<bits/stdc++.h>
#define cout cerr
#define C(x,y) (x-y+p)%p 
#define debug cout<<"debug"<<endl;
using namespace std;
const int N=105;
const int M=25;
int n,p,L,G,t;
struct node {
	int a[13];
}idea[N];
bitset<M> f[2][N][N][M];
int read() {
	int x=0,f=0; char ch=getchar();
	while(!isdigit(ch)) {if(ch=='-') f=1; ch=getchar();}
	while(isdigit(ch)) {x=(x<<1)+(x<<3)+(ch^48); ch=getchar();}
	return f?-x:x;
}
int main()
{
	srand(time(0));
	n=read(),p=read();
	t=sqrt(n);
	for(int i=1;i<=n;i++) {
		for(int j=1;j<=12;j++) idea[i].a[j]=read();
	}
	L=read()%p,G=read()%p;
	random_shuffle(idea+1,idea+n+1);
	f[0][0][0][t].set(t);
	for(int i=1;i<=n;i++) {
		for(int l=0;l<p;l++) {
			for(int g=0;g<p;g++) {
				for(int x=0;x<=2*t;x++) {
					f[i&1][l][g][x].reset();
					f[i&1][l][g][x]|=f[(i&1)^1][C(l,idea[i].a[1])][C(g,idea[i].a[2])][x]<<1;
					if(x+1<=2*t) f[i&1][l][g][x]|=f[(i&1)^1][C(l,idea[i].a[3])][C(g,idea[i].a[4])][x+1];
					if(x+1<=2*t) f[i&1][l][g][x]|=f[(i&1)^1][C(l,idea[i].a[5])][C(g,idea[i].a[6])][x+1]>>1;
					f[i&1][l][g][x]|=f[(i&1)^1][C(l,idea[i].a[7])][C(g,idea[i].a[8])][x]>>1;
					if(x-1>=0) f[i&1][l][g][x]|=f[(i&1)^1][C(l,idea[i].a[9])][C(g,idea[i].a[10])][x-1];
					if(x-1>=0) f[i&1][l][g][x]|=f[(i&1)^1][C(l,idea[i].a[11])][C(g,idea[i].a[12])][x-1]<<1;
				}
			}
		}
	}
	if(f[n&1][L][G][t][t]) printf("Chaotic Evil");
	else printf("Not a true problem setter");
	return 0;
}

详细

Test #1:

score: 100
Accepted
time: 209ms
memory: 7772kb

input:

100 97
44 3 0 0 0 0 0 0 0 0 0 0
44 3 0 0 0 0 0 0 0 0 0 0
16 45 0 0 0 0 0 0 0 0 0 0
44 3 0 0 0 0 0 0 0 0 0 0
44 3 0 0 0 0 0 0 0 0 0 0
44 3 0 0 0 0 0 0 0 0 0 0
16 45 0 0 0 0 0 0 0 0 0 0
44 3 0 0 0 0 0 0 0 0 0 0
44 3 0 0 0 0 0 0 0 0 0 0
16 45 0 0 0 0 0 0 0 0 0 0
16 45 0 0 0 0 0 0 0 0 0 0
44 3 0 0 0 0 0...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #2:

score: 0
Accepted
time: 211ms
memory: 7940kb

input:

100 97
29 17 58 4 35 95 58 89 7 89 30 95
91 48 23 35 0 29 23 23 69 23 92 29
95 79 40 96 17 90 40 84 86 84 12 90
88 72 33 89 10 83 33 77 79 77 5 83
24 92 53 79 30 73 53 67 2 67 25 73
42 27 84 44 61 38 84 32 33 32 56 38
35 35 64 22 41 16 64 10 13 10 36 16
18 8 60 25 37 19 60 13 9 13 32 19
85 72 17 59 ...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #3:

score: 0
Accepted
time: 211ms
memory: 7720kb

input:

100 97
67 73 33 0 39 0 85 15 25 59 16 88
48 24 11 17 20 48 66 63 6 10 94 39
31 10 94 34 3 34 49 49 86 93 77 25
87 5 50 95 59 29 8 44 45 88 36 20
55 16 18 9 27 40 73 55 13 2 4 31
87 50 53 74 59 74 8 89 45 36 36 65
48 21 11 14 20 45 66 60 6 7 94 36
52 23 15 16 24 47 70 62 10 9 1 38
85 50 51 74 57 74 6...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #4:

score: 0
Accepted
time: 206ms
memory: 7728kb

input:

100 97
46 64 39 42 88 31 47 8 54 13 5 41
52 64 45 42 94 31 53 8 60 13 11 41
68 12 89 23 13 76 69 53 76 58 27 86
3 64 24 75 45 31 4 8 11 13 59 41
83 65 7 76 28 32 84 9 91 14 42 42
66 66 87 77 11 33 67 10 74 15 25 43
0 26 90 4 42 90 1 67 8 72 56 3
85 53 9 64 30 20 86 94 93 2 44 30
93 61 17 72 38 28 94...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #5:

score: 0
Accepted
time: 212ms
memory: 7768kb

input:

100 97
23 29 41 5 19 68 15 74 94 1 1 27
95 47 16 23 50 85 87 92 69 19 73 45
46 93 64 69 42 35 38 41 20 65 24 91
66 84 84 60 62 26 58 32 40 56 44 82
16 84 34 60 12 26 8 32 87 56 91 82
0 80 18 56 93 22 89 28 71 52 75 78
19 37 37 13 71 75 11 82 90 9 94 35
72 16 90 89 68 55 64 61 46 85 50 14
28 3 46 76 ...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #6:

score: 0
Accepted
time: 210ms
memory: 7876kb

input:

100 97
81 37 33 34 30 26 58 50 9 53 69 95
0 7 49 4 14 96 74 20 25 23 85 65
65 15 17 12 79 7 42 28 90 31 53 73
79 81 31 78 28 70 56 94 7 0 67 42
43 71 92 68 57 63 20 84 68 87 31 32
93 95 45 92 42 84 70 11 21 14 81 56
67 59 19 56 81 51 44 72 92 75 55 20
86 63 38 60 35 52 63 76 14 79 74 24
17 31 66 28 ...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #7:

score: 0
Accepted
time: 202ms
memory: 7872kb

input:

100 97
82 94 13 53 18 14 43 83 15 27 83 81
82 6 86 77 42 8 43 92 15 36 83 90
15 14 43 70 72 16 73 3 29 93 16 1
61 73 89 32 21 75 6 14 91 6 62 60
12 70 40 29 69 72 70 59 18 18 13 57
87 18 42 59 71 5 72 89 44 33 15 87
19 69 47 28 76 71 77 58 25 17 20 56
49 41 77 0 9 43 10 30 79 71 34 77
50 9 62 17 10 ...

output:

Not a true problem setter

result:

ok single line: 'Not a true problem setter'

Test #8:

score: 0
Accepted
time: 210ms
memory: 7712kb

input:

100 97
4 55 29 68 19 42 76 15 0 8 61 28
23 1 59 14 95 91 55 64 76 57 40 77
72 79 51 86 87 66 47 39 11 26 32 52
32 4 11 11 47 88 7 61 28 54 38 80
80 42 2 43 95 29 55 2 76 92 40 15
51 35 30 42 9 16 26 92 47 85 11 8
91 24 70 31 9 11 66 81 87 74 0 3
37 16 67 17 6 94 63 67 84 60 48 80
9 0 85 7 24 84 81 5...

output:

Not a true problem setter

result:

ok single line: 'Not a true problem setter'

Test #9:

score: 0
Accepted
time: 203ms
memory: 7560kb

input:

100 97
88 72 38 23 84 87 83 6 60 58 87 88
4 46 51 94 0 61 23 80 49 29 3 62
18 46 65 94 14 61 13 77 63 29 1 25
19 26 66 74 15 41 95 20 64 9 18 42
20 39 67 87 16 54 15 70 89 25 19 55
21 63 68 14 17 78 16 94 66 46 44 82
37 77 84 28 33 92 32 11 66 23 36 93
30 67 77 18 50 85 25 1 75 50 29 83
4 61 67 49 1...

output:

Not a true problem setter

result:

ok single line: 'Not a true problem setter'

Test #10:

score: 0
Accepted
time: 207ms
memory: 7728kb

input:

100 97
58 8 81 58 35 11 63 11 40 58 49 88
22 57 45 10 96 60 27 60 4 10 13 40
68 10 91 60 45 13 73 13 13 43 96 10
84 70 10 23 61 73 72 47 66 23 15 70
78 17 4 67 55 20 83 20 60 67 69 0
51 13 14 80 65 33 93 33 70 80 19 30
44 53 30 86 21 56 49 56 26 6 72 53
18 94 41 47 92 0 6 71 0 47 46 94
20 16 43 66 5...

output:

Not a true problem setter

result:

ok single line: 'Not a true problem setter'

Test #11:

score: 0
Accepted
time: 211ms
memory: 7728kb

input:

100 97
17 96 80 0 94 88 45 78 0 96 65 86
26 62 89 63 6 54 72 63 88 43 74 52
2 41 83 61 79 33 30 23 64 22 50 31
6 51 69 52 4 62 34 33 68 32 54 41
44 30 10 31 27 50 72 12 9 11 92 20
17 66 80 67 15 77 45 48 79 47 65 56
51 11 17 12 49 22 79 90 16 89 2 1
5 58 68 59 3 69 33 40 67 39 53 48
81 2 29 81 43 72...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #12:

score: 0
Accepted
time: 206ms
memory: 7688kb

input:

100 97
6 50 28 67 3 45 8 24 31 86 56 11
65 87 87 7 62 82 15 7 90 26 18 48
48 65 70 82 45 60 50 39 73 4 1 26
61 35 83 88 58 66 11 27 86 10 14 32
14 15 88 50 11 10 61 68 39 51 64 73
11 65 33 82 8 60 58 21 88 22 61 26
19 30 41 83 16 61 66 22 44 5 69 27
2 12 24 29 96 7 49 65 79 66 52 70
12 96 34 16 9 91...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #13:

score: 0
Accepted
time: 210ms
memory: 7772kb

input:

100 97
82 8 16 78 23 15 96 76 65 6 4 44
72 91 6 64 13 1 86 62 17 11 48 55
2 66 71 20 78 54 54 18 23 45 16 11
9 61 94 59 4 93 77 57 46 84 39 50
19 0 50 70 57 7 33 68 2 95 38 36
29 10 60 80 29 36 43 78 12 8 5 71
73 22 7 92 14 29 87 90 56 20 92 58
4 40 35 13 42 47 77 30 84 38 77 4
38 82 26 80 33 17 9 7...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #14:

score: 0
Accepted
time: 211ms
memory: 7732kb

input:

100 97
96 18 35 57 83 25 95 51 29 34 11 44
8 34 74 51 25 19 37 45 1 6 50 38
84 90 23 32 41 22 83 26 47 84 96 19
32 7 68 46 19 14 1 62 92 1 44 33
69 50 75 14 56 57 68 83 32 44 81 76
64 77 3 19 51 84 63 13 27 71 52 11
56 39 25 56 73 24 85 50 49 11 1 43
66 53 29 87 77 55 89 81 53 42 5 74
46 89 82 31 33...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #15:

score: 0
Accepted
time: 210ms
memory: 7716kb

input:

100 97
57 40 96 82 22 2 67 90 10 56 5 31
30 26 87 60 92 85 22 84 80 42 75 17
52 75 91 20 17 37 62 28 5 91 0 66
36 37 93 71 1 96 46 87 86 53 43 50
52 55 91 0 17 17 62 8 5 71 0 46
45 10 43 22 48 47 93 38 36 4 31 76
43 33 3 67 67 17 53 83 93 49 88 24
12 16 87 42 92 67 40 58 80 24 75 96
23 7 80 41 85 66...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #16:

score: 0
Accepted
time: 219ms
memory: 7768kb

input:

100 97
32 69 85 0 16 13 75 72 35 67 7 54
83 96 26 4 67 40 42 25 86 94 58 81
12 85 78 39 9 52 81 37 28 9 0 93
58 53 14 81 42 94 17 79 48 28 33 38
21 40 61 45 5 81 77 66 24 38 93 25
47 90 16 44 44 57 19 42 63 14 35 1
67 54 23 82 51 95 26 80 70 52 3 84
94 80 50 11 78 24 53 9 0 78 30 13
90 15 46 43 74 5...

output:

Not a true problem setter

result:

ok single line: 'Not a true problem setter'

Test #17:

score: 0
Accepted
time: 2ms
memory: 5568kb

input:

1 1
0 0 0 0 0 0 0 0 0 0 0 0
0 0

output:

Not a true problem setter

result:

ok single line: 'Not a true problem setter'

Test #18:

score: 0
Accepted
time: 1ms
memory: 5636kb

input:

2 1
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #19:

score: 0
Accepted
time: 1ms
memory: 5576kb

input:

3 1
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #20:

score: 0
Accepted
time: 25ms
memory: 6872kb

input:

42 68
35 67 59 6 15 59 32 67 48 56 1 16
45 55 34 53 51 45 8 7 49 57 19 19
47 44 46 42 4 48 63 4 32 41 12 12
7 12 38 39 16 56 6 11 21 42 25 18
51 36 52 67 49 46 43 8 4 57 66 56
37 28 22 47 38 64 17 4 9 58 60 34
43 14 43 6 29 58 66 40 29 36 3 36
30 41 45 3 19 22 43 54 5 25 7 58
24 48 65 36 41 51 66 67...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #21:

score: 0
Accepted
time: 5ms
memory: 5980kb

input:

64 18
10 2 2 10 1 10 15 3 10 16 15 5
2 8 2 4 0 1 7 12 2 15 9 13
5 14 8 2 3 9 8 2 5 8 13 16
11 3 10 1 13 6 3 6 7 16 12 13
17 8 12 8 0 15 1 8 11 2 10 17
12 16 13 2 5 11 13 10 14 12 0 6
9 2 17 3 16 7 11 9 2 9 15 10
16 7 13 7 14 7 3 13 2 0 7 17
1 4 15 9 7 14 4 17 17 5 10 6
9 10 1 11 17 11 4 6 9 8 9 0
1 ...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #22:

score: 0
Accepted
time: 113ms
memory: 7692kb

input:

74 95
93 41 35 24 16 26 93 83 47 16 65 77
48 84 29 3 55 89 13 64 12 4 67 33
25 25 79 86 76 10 40 86 18 85 33 24
16 56 33 17 74 7 40 67 84 24 71 20
16 50 4 42 26 53 40 93 81 73 61 3
50 47 3 51 36 76 41 43 18 54 24 55
54 57 32 35 45 69 34 1 48 58 28 70
32 78 77 71 75 86 10 83 77 61 83 40
94 23 84 81 4...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #23:

score: 0
Accepted
time: 86ms
memory: 7012kb

input:

84 72
8 27 47 51 23 11 53 48 22 65 53 21
3 37 55 60 14 34 61 53 69 8 15 55
15 52 13 22 71 69 40 70 68 56 58 31
39 55 8 65 68 21 68 26 21 61 40 62
59 51 64 38 6 27 23 12 15 58 37 46
4 18 71 65 44 1 31 55 44 43 38 20
57 39 15 30 38 40 14 51 48 53 25 16
16 3 30 7 33 42 61 56 52 37 71 43
64 70 63 20 61 ...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #24:

score: 0
Accepted
time: 219ms
memory: 7772kb

input:

100 100
48 61 56 61 0 67 26 23 77 60 64 67
52 19 32 69 71 25 80 81 83 81 18 25
69 74 35 24 66 30 27 36 30 86 22 67
55 37 41 0 29 56 62 12 74 62 70 56
92 59 75 59 8 2 0 21 80 71 88 65
81 41 91 41 53 47 34 3 53 3 78 47
55 0 9 50 8 56 74 12 39 12 88 6
78 54 75 91 34 60 13 66 33 16 88 10
97 3 47 53 33 5...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #25:

score: 0
Accepted
time: 224ms
memory: 7828kb

input:

100 100
77 60 30 53 13 5 46 37 52 71 15 69
94 80 88 73 14 75 92 34 99 91 79 12
67 56 21 26 89 28 50 37 59 94 84 92
14 47 7 17 41 19 80 78 86 35 23 83
57 51 63 44 76 96 29 5 12 12 72 83
1 4 30 47 87 49 31 58 56 65 80 63
37 65 78 58 94 60 10 42 90 76 84 24
61 39 97 82 91 84 81 93 73 50 42 98
35 16 3 5...

output:

Not a true problem setter

result:

ok single line: 'Not a true problem setter'

Test #26:

score: 0
Accepted
time: 209ms
memory: 7712kb

input:

100 97
0 0 0 0 0 0 60 0 0 0 0 0
0 0 0 0 0 0 60 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 0
60 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 0
0 ...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #27:

score: 0
Accepted
time: 206ms
memory: 7740kb

input:

100 97
0 0 0 0 0 0 0 0 28 0 0 0
0 0 28 0 0 0 0 0 0 0 0 0
0 0 28 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 28 0 0 0
0 0 0 0 0 0 0 0 28 0 0 0
0 0 0 30 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 28 0 0 0
0 0 0 30 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 28 0 0 0
0 0 0 0 0 0 0 0 0 30 0 0
0 0 0 0 0 0 0 0 28 0 0 0
0 0 0 0 0 0 0 0 0 ...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #28:

score: 0
Accepted
time: 209ms
memory: 7868kb

input:

100 97
0 0 0 0 0 0 0 0 0 0 34 0
0 0 0 0 0 0 0 0 0 0 0 53
0 0 0 0 0 0 0 0 0 0 34 0
0 0 0 0 0 53 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 53
0 0 0 0 0 0 0 0 0 0 34 0
0 0 0 0 0 53 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 53
0 0 0 0 0 0 0 0 0 0 34 0
0 0 0 0 0 0 0 0 0 0 34 0
0 0 0 0 0 0 0 0 0 0 0 53
0 0 0 0 0 0 0 0 0 ...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #29:

score: 0
Accepted
time: 206ms
memory: 7664kb

input:

100 97
78 75 48 56 6 69 30 4 24 23 66 10
93 83 63 64 21 77 45 12 39 31 81 18
22 55 89 33 47 46 35 78 65 0 10 84
61 24 31 5 86 18 13 50 7 69 49 56
63 55 33 33 88 46 76 78 9 0 51 84
38 24 8 2 63 15 51 47 81 66 26 53
35 86 5 67 60 80 48 18 78 34 23 21
68 38 38 19 93 32 20 64 14 83 56 70
29 90 96 71 54 ...

output:

Chaotic Evil

result:

ok single line: 'Chaotic Evil'

Test #30:

score: -100
Wrong Answer
time: 210ms
memory: 7796kb

input:

100 97
46 38 60 72 14 44 24 79 45 45 56 73
94 40 73 22 62 46 72 81 93 47 7 75
89 34 6 68 57 40 67 75 88 41 2 69
26 1 5 80 91 7 4 42 25 8 36 36
62 27 41 9 30 33 40 68 61 34 72 62
64 12 43 91 32 18 42 53 63 19 74 47
19 45 33 79 84 51 94 86 18 52 29 80
80 82 59 19 48 88 58 26 79 37 90 20
12 60 88 94 77...

output:

Not a true problem setter

result:

wrong answer 1st lines differ - expected: 'Chaotic Evil', found: 'Not a true problem setter'