# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1026244 | AdamGS | Ancient Machine (JOI21_ancient_machine) | C++17 | 37 ms | 8152 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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) {
rep(i, n) if(T[i]=='X') Send(1); else Send(0);
}
#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) {
int mi=-1;
for(int i=m-1; i>=0; --i) if(T[i]) mi=i;
rep(i, n) if(T[i] && i!=mi) Remove(i);
rep(i, n) if(!T[i]) Remove(i);
if(mi!=-1) Remove(mi);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |