QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#127365#5191. 混乱邪恶DiuWA 571ms12424kbC++141.1kb2023-07-19 16:23:462023-07-19 16:23:49

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 16:23:49]
  • 评测
  • 测评结果:WA
  • 用时:571ms
  • 内存:12424kb
  • [2023-07-19 16:23:46]
  • 提交

answer

#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int N=110;
int n,p,x,y;
const int xx[]={0,-1,-1,0,1,1};
const int yy[]={1,0,-1,-1,0,1};
struct node{
	int a[6],b[6];
}a[N];
__int128 f[51][51][N],g[51][51][N],_2[N];
signed main(){
	scanf("%d%d",&n,&p);
	for(int i=1;i<=n;i++)
		for(int j=0;j<6;j++)scanf("%d%d",&a[i].a[j],&a[i].b[j]);
	random_shuffle(a+1,a+n+1);
	f[25][25][0]=1;
	_2[0]=1;
	for(int i=1;i<=p;i++)_2[i]=_2[i-1]<<1;
	for(int i=1;i<=n;i++){
		for(int j=0;j<=50;j++){
			for(int k=0;k<=50;k++){
				for(int x=0;x<p;x++)if(f[j][k][x]){
					for(int t=0;t<6;t++)if(j+xx[t]>=0&&j+xx[t]<=50&&k+yy[t]>=0&&k+yy[t]<=50){
						g[j+xx[t]][k+yy[t]][(x+a[i].a[t])%p]|=(f[j][k][x]&(_2[p-a[i].b[t]-1]-1))<<a[i].b[t];
						g[j+xx[t]][k+yy[t]][(x+a[i].a[t])%p]|=f[j][k][x]>>p-a[i].b[t];
					}
				}
			}
		}
		for(int j=0;j<=50;j++)
			for(int k=0;k<=50;k++)
				for(int x=0;x<p;x++)f[j][k][x]=g[j][k][x],g[j][k][x]=0;
	}
	scanf("%d%d",&x,&y);
	puts((f[25][25][x]>>y&1)?"Chaotic Evil":"Not a true problem setter");
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 571ms
memory: 12424kb

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:

Not a true problem setter

result:

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