제출 #1366677

#제출 시각아이디문제언어결과실행 시간메모리
1366677wangzhiyi33Ancient Machine (JOI21_ancient_machine)C++20
0 / 100
26 ms6416 KiB
#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;

namespace {

int variable_example = 0;

}

void Anna(int N, vector<char> s) {
  int x=-1,y=-1;
  for(int q=0;q<N;q++){
    if(s[q]=='X'){  
      if(x==-1){
        x=q; Send(1);
      }
      else{
        Send(0);
      }
    }
    else if(s[q]=='Y'){
      if(x==-1 || y!=-1){
        Send(0);
      }
      else{
        Send(1),y=q;
      }
    }
    else{
      if(x==-1 || y==-1){
        Send(0);
      }
      else{
        Send(1); y=-1;
      }
    }
  }
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;

namespace {

int variable_example = 0;

int FunctionExample(int P) { return 1 - P; }

}  // namespace

void Bruno(int N, int L, vector<int> A) {
  int x=-1,y=-1;
  for(int q=0;q<L;q++){
    if(A[q]==0){
      Remove(q);
    }
    else if(x==-1){
      x=q;
    }
    else if(y==-1){
      y=q;
    }
    else{
      Remove(y),Remove(q);
      y=-1;
    }
  }
  if(x!=-1)Remove(x);
  if(y!=-1)Remove(y);
}
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…