# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
417218 | tqbfjotld | Ancient Machine (JOI21_ancient_machine) | C++17 | 79 ms | 8340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include <vector>
using namespace std;
void Anna(int N, std::vector<char> S) {
bool found = false;
for (int x = 0; x<N; x++){
if (S[x]=='X') found = true;
Send((!found) || S[x]=='Z');
}
}
#include "Bruno.h"
#include <vector>
#include <cassert>
using namespace std;
void Bruno(int N, int L, std::vector<int> A) {
assert(L==N);
int Xpos = -1;
for (int x = 0; x<N; x++){
if (!A[x]){
Xpos = x;
break;
}
}
if (Xpos==-1){
for (int x = 0; x<N; x++){
Remove(x);
}
return;
}
vector<int> rem;
for (int x = 0; x<Xpos; x++){
Remove(x);
}
for (int x = Xpos+1; x<N; x++){
if (A[x]){
while (!rem.empty()){
Remove(rem.back());
rem.pop_back();
}
Remove(x);
}
else{
rem.push_back(x);
}
}
Remove(Xpos);
for (auto x : rem){
Remove(x);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |