QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#20058#3098. Ancient Machineqingyu_orz0 72ms10572kbC++201015b2022-02-14 16:56:272023-01-17 10:40:15

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-01-17 10:40:15]
  • 评测
  • 测评结果:0
  • 用时:72ms
  • 内存:10572kb
  • [2022-02-14 16:56:27]
  • 提交

Anna

#include<bits/stdc++.h>
#include "Anna.h"
using namespace std;
void Anna(int n,vector<char> g){
	int flag=0,lst=-1;
	string st;
	for(auto cu:g){
		int ff=1;
		if(cu=='Y')ff=0;
		else if(flag&&cu=='X')ff=0;
		else if(!flag&&cu=='Z')ff=0;
		else if(cu=='X')ff=2,flag=1;
		else ff=1;
		if(ff==0)st+='0';
		else{
			if(cu!='Z'||lst!=1)st+='1';
			else st+='0';
			if(cu=='Z')lst=1;
			if(ff==2)st+='0';
		}
	}
	for(int i=0;i<st.size();++i)Send(st[i]-'0');
}

Bruno

#include<bits/stdc++.h>
#include "Bruno.h"
using namespace std;
int pre[100005],nxt[100005];
int vist[100005];
void Bruno(int n,int gs,vector<int>g){
	set<int>se;
	for(int i=1;i<=n;++i)pre[i]=i-1,nxt[i]=i+1;
	int X=-1,wz=0;
	for(auto cu:g){
		++wz;
		if(cu==1&&X==-1){
			X=wz;
			--wz;
			continue;
		}
		if(cu==0||X==-1)continue;
		int df=wz;
		while(df>=X){
			Remove(df-1);
			nxt[pre[df]]=nxt[df];
			pre[nxt[df]]=pre[df];
			vist[df]=1;
			df=pre[df];
		}
	}
	for(int i=1;i<=n;++i)if(!vist[i])Remove(i-1);
}

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 4ms
memory: 3792kb

input:

18
Y X Y Z X Z X X Z Z Y Y Z Y Y Z X X

output:

19
0100100000000000000

input:

19
0100100000000000000

output:

0 19 0

result:

wrong answer your query is valid but your solution is not optimal: read 0 but expected 3

Subtask #2:

score: 0
Wrong Answer

Test #12:

score: 0
Wrong Answer
time: 72ms
memory: 10572kb

input:

100000
X Z X Z Z X Y Z Y X Y X Z Z Z Y X Z Y X Y Y X Y Y Y Z Y Z Z Y X X Y X X Y Y X X X Z Y Y Y Z Z Z Z Y X Y Y Z Z Z X Y Z X X X X Y X Y X X Z X Z Z Z X Y X X X Z X Z X X X Y Y Y Y Z X X Y Z Y Y X Z X Z Z Z Z Z Y Z Y X Y Y Y Y X Z Z Y Z Z Y Z Z Z X Z Z X X Z Z Z Z X X Z Y Y Z Y Y Z Z Y Y Z Y Z Y Z...

output:

100001
10100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

input:

100001
10100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

output:

0 100001 0

result:

wrong answer your query is valid but your solution is not optimal: read 0 but expected 22133