QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#20308 | #3098. Ancient Machine | 2018ty22# | 0 | 12ms | 3100kb | C++20 | 846b | 2022-02-15 15:13:13 | 2023-01-17 10:43:34 |
Judging History
Anna
#include<cstdio>
#include<vector>
using namespace std;
void Send(int a);
void Anna(int N,vector<char> S)
{
bool ok=false;
for(int i=N-1;i;--i)
if(S[i]=='Z')
{
ok=true;
for(int j=0;j<17;++j)Send(i&(1<<j));
}
if(!ok)return;
for(int i=0;i<N;++i)
{
if(i+1<N&&S[i]=='X'&&S[i+1]!='X')
{
Send(1);
++i;
}
else Send(0);
}
}
Bruno
#include<cstdio>
#include<vector>
using namespace std;
void Remove(int d);
void Bruno(int N,int L,vector<int> A)
{
static bool us[100001];
int lst=0,lp;
for(int i=0;i<17;++i)
lst|=A[i]<<i;
for(int i=17,j=0;i<L;++i,++j)
if(A[i])
us[j]=true,++j;
lp=lst;
for(int i=lst+1;i<N;++i)Remove(i);
for(int i=N-1;~i;--i)
if(us[i])
{
for(int j=i+1;j<lst;++j)Remove(j);
Remove(i);
lst=i;
}
for(int i=0;i<lst;++i)Remove(i);
Remove(lp);
}
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: 3076kb
input:
18 Y X Y Z X Z X X Z Z Y Y Z Y Y Z X X
output:
Wrong Answer [1]
input:
Wrong Answer [1]
output:
Unauthorized output
result:
wrong output format Expected integer, but "Unauthorized" found
Subtask #2:
score: 0
Wrong Answer
Test #12:
score: 0
Wrong Answer
time: 12ms
memory: 3100kb
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