QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#604353#5191. 混乱邪恶DaiRuiChen007RE 0ms0kbC++17986b2024-10-02 10:14:442024-10-02 10:14:44

Judging History

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

  • [2024-10-02 10:14:44]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-10-02 10:14:44]
  • 提交

answer

#include<bits/stdc++.h>
#define ui unsigned int 
using namespace std;
mt19937 rnd(time(0));
const ui U=(1u<<31)-1;
int n,p,s,t;
ui f[105][105][32],g[105][105][32];
array<int,12> A[105];
signed main() {
	scanf("%d%d",&n,&p);
	for(int i=1;i<=n;++i) for(int &x:A[i]) scanf("%d",&x);
	scanf("%d%d",&s,&t);
	for(int k:{0,1,2,3,4}) {
		shuffle(A+1,A+n+1,rnd);
		memset(f,0,sizeof(f)),f[0][0][15]=1<<15;
		for(int o=1;o<=n;++o) {
			auto a=A[o];
			memset(g,0,sizeof(g));
			for(int i=0;i<p;++i) for(int j=0;j<p;++j) for(int x=1;x<31;++x) {
				const ui &z=f[i][j][x];
				g[(i+a[0])%p][(j+a[1])%p][x]|=(z&U)<<1;
				g[(i+a[2])%p][(j+a[3])%p][x-1]|=z;
				g[(i+a[4])%p][(j+a[5])%p][x-1]|=z>>1;
				g[(i+a[6])%p][(j+a[7])%p][x]|=z>>1;
				g[(i+a[8])%p][(j+a[9])%p][x+1]|=z;
				g[(i+a[10])%p][(j+a[11])%p][x+1]|=(z&U)<<1;
			}
			memcpy(f,g,sizeof(f));
		}
		if(f[s][t][15]>>15&1) return puts("Chaotic Evil");
	}
	puts("Not a true problem setter");
	return 0;
}

詳細信息

Test #1:

score: 0
Runtime Error

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: