QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#488256 | #3098. Ancient Machine | Rafi22 | 0 | 30ms | 8224kb | C++20 | 1.9kb | 2024-07-23 19:05:51 | 2024-07-23 19:05:52 |
Judging History
Anna
#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
auto&operator<<(auto&o,pair<auto,auto>p){return o<<"("<<p.first<<", "<<p.second<<")";}
auto operator<<(auto&o,auto x)->decltype(x.end(),o){o<<"{";int i=0;for(auto e:x)o<<","+!i++<<e;return o<<"}";}
#define debug(X...)cerr<<"["#X"]: ",[](auto...$){((cerr<<$<<"; "),...)<<endl;}(X)
#else
#define debug(...){}
#endif
#define ll long long
#define ld long double
#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define FOR(i,l,r) for(int i=(l);i<=(r);i++)
#define ROF(i,r,l) for(int i=(r);i>=(l);i--)
namespace {
}
void Anna(int n,vector<char>S)
{
int xd=n;
FOR(i,0,n-1)
{
if(S[i]=='X')
{
xd=i;
break;
}
}
vector<int>a(n,0);
if(xd!=n)
{
if(xd>0) a[xd-1]=1;
FOR(i,xd+1,n-1) if(S[i]=='Z'&&(i==n-1||S[i+1]!='Z')) a[i]=1;
}
FOR(i,0,n-1) Send(a[i]);
}
Bruno
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
auto&operator<<(auto&o,pair<auto,auto>p){return o<<"("<<p.first<<", "<<p.second<<")";}
auto operator<<(auto&o,auto x)->decltype(x.end(),o){o<<"{";int i=0;for(auto e:x)o<<","+!i++<<e;return o<<"}";}
#define debug(X...)cerr<<"["#X"]: ",[](auto...$){((cerr<<$<<"; "),...)<<endl;}(X)
#else
#define debug(...){}
#endif
#define ll long long
#define ld long double
#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define FOR(i,l,r) for(int i=(l);i<=(r);i++)
#define ROF(i,r,l) for(int i=(r);i>=(l);i--)
namespace {
}
void Bruno(int n,int l,vector<int>A)
{
int last=-1,k=-1;
bool xd=0;
FOR(i,0,n-1)
{
if(A[i])
{
ROF(j,i-1,last+1) Remove(j);
Remove(i);
last=i+1;
}
}
ROF(j,n-1,last+1) Remove(j);
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 2ms
memory: 4040kb
input:
18 Y X Y Z X Z X X Z Z Y Y Z Y Y Z X X
output:
18 100101000100100100
input:
18 100101000100100100
output:
5
result:
wrong answer Wrong Answer [5]
Subtask #2:
score: 0
Wrong Answer
Test #12:
score: 0
Wrong Answer
time: 30ms
memory: 8224kb
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:
100000 01001001000000100100000000100100000000000100000010000001001000000000100010000010100000001000100010000010100000000100100010010000010010010001001010100010000010100010000000100010101000000001001000100010000100000101010010000010000001010101010000001000101000001010001000100000010101001000010010010...
input:
100000 01001001000000100100000000100100000000000100000010000001001000000000100010000010100000001000100010000010100000000100100010010000010010010001001010100010000010100010000000100010101000000001001000100010000100000101010010000010000001010101010000001000101000001010001000100000010101001000010010010...
output:
5
result:
wrong answer Wrong Answer [5]