# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
798404 | fatemetmhr | Ancient Machine (JOI21_ancient_machine) | C++17 | 71 ms | 10336 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "Anna.h"
#include <bits/stdc++.h>
//#pragma GCC optimize ("O3")
//#pragma GCC target("avx2")
//#pragma GCC optimize("unroll-loops,Ofast")
using namespace std;
typedef long long ll;
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()
#define fi first
#define se second
void Anna(int n, std::vector<char> s) {
for(int i = 0; i < n; i++){
if(s[i] == 'X'){
Send(0);
Send(0);
}
if(s[i] == 'Y'){
Send(1);
Send(0);
}
if(s[i] == 'Z'){
Send(1);
Send(1);
}
}
}
// ~ Be Name Khoda ~ //
#include "Bruno.h"
#include <bits/stdc++.h>
//#pragma GCC optimize ("O3")
//#pragma GCC target("avx2")
//#pragma GCC optimize("unroll-loops,Ofast")
using namespace std;
typedef long long ll;
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()
#define fi first
#define se second
void Bruno(int n, int l, std::vector<int> a){
vector <int> av, have;
int done = 0;
for(int i = 0; i < n; i++){
int cnt = a[2 * i] + a[2 * i + 1];
have.pb(cnt);
if(cnt == 0){
done++;
av.pb(i);
}
if(cnt == 1){
av.pb(i);
}
if(cnt == 2){
while(done >= 1){
done -= (1 ^ have[av.back()]);
if(done == 0){
done++;
break;
}
Remove(av.back());
av.pop_back();
}
Remove(i);
}
}
while(av.size()){
Remove(av.back());
av.pop_back();
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |