QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#19982#3098. Ancient MachineXiao_Luo_Xuan0 6ms3856kbC++20772b2022-02-14 14:49:452023-01-17 10:37:10

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:37:10]
  • 评测
  • 测评结果:0
  • 用时:6ms
  • 内存:3856kb
  • [2022-02-14 14:49:45]
  • 提交

Anna

#include<bits/stdc++.h>
#include "Anna.h"
using namespace std;
const int N=1e5+5;

void Anna(int n,vector <char> S){
	bool ans[N];
	int st=0;
	for(int i=0;i<n;i++){
		if(S[i]=='X'){
			st=i;
			break;
		}
	}
	ans[st]=1;
	for(int i=st+1;i<n;i++)
		if(S[i]=='Z' && S[i-1]!='Z') ans[i]=1;
	for(int i=0;i<n;i++) Send(ans[i]);
}

Bruno

#include<bits/stdc++.h>
#include "Bruno.h"
using namespace std;
const int N=1e5+5;

void Bruno(int n,int l,vector <int> A){
	int st=0;
	for(int i=0;i<l;i++){
		if(A[i]){
			st=i;
			break;
		}
	}
	for(int i=0;i<st;i++) Remove(i);
	int lst=st+1;
	for(int i=st+1;i<l;i++){
		if(A[i]){
			for(int t=i-1;t>=lst;t--) Remove(t);
			Remove(i);
			lst=i+1;
		}
	}
	for(int i=lst+1;i<n;i++) Remove(i);
	Remove(st);
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

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

input:

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

output:

18
010101001000100100

input:

18
010101001000100100

output:

5

result:

wrong answer Wrong Answer [5]

Subtask #2:

score: 0
Wrong Answer

Test #12:

score: 0
Wrong Answer
time: 6ms
memory: 3856kb

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:

Wrong Answer [1]

input:

Wrong Answer [1]

output:

Unauthorized output

result:

wrong output format Expected integer, but "Unauthorized" found