Submission #1026287

# Submission time Handle Problem Language Result Execution time Memory
1026287 2024-07-17T18:55:58 Z AdamGS Ancient Machine (JOI21_ancient_machine) C++17
0 / 100
45 ms 8636 KB
#include "Anna.h"
#include<bits/stdc++.h>
using namespace std;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
void Anna(int n, vector<char>T) {
  vector<int>P(n);
  int akt=0;
  rep(i, n) if(T[i]=='X'+akt) {
    P[i]=1;
    ++akt;
    if(akt==3) akt=1;
  }
  rep(i, n) Send(P[i]);
}
#include "Bruno.h"
#include<bits/stdc++.h>
using namespace std;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
void Bruno(int n, int m, vector<int>T) {
  rep(i, n) if(!T[i]) Remove(i);
  int akt=0;
  rep(i, n) if(T[i]) {
    if(akt>0) Remove(i);
    ++akt;
    if(akt==3) akt=1;
  }
  akt=0;
  rep(i, n) if(T[i]) {
    if(akt==0) Remove(i);
    ++akt;
    if(akt==3) akt=1;
  }
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 792 KB Output is correct
2 Correct 0 ms 796 KB Output is correct
3 Correct 1 ms 796 KB Output is correct
4 Correct 0 ms 796 KB Output is correct
5 Incorrect 0 ms 780 KB Wrong Answer [6]
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 45 ms 8636 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -