# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
965321 | phoenix0423 | Ancient Machine 2 (JOI23_ancient2) | C++17 | 156 ms | 1636 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "ancient2.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pll;
#define fastio ios::sync_with_stdio(false), cin.tie(0)
#pragma GCC optimize("Ofast")
#define pb push_back
#define eb emplace_back
#define f first
#define s second
// #define int long long
#define lowbit(x) x&-x
const int maxn = 2e5 + 5;
string Solve(int n){
string ans;
for(int i = 0; i < n; i++){
vector<int> a(1002), b(1002);
for(int j = 0; j < i; j++) a[j] = j + 1, b[j] = j + 1;
a[i] = 1000, b[i] = 1001;
a[1001] = 1001, b[1001] = 1001;
a[1000] = 1000, b[1000] = 1000;
int k = Query(1002, a, b);
if(k == 1001) ans += '1';
else ans += '0';
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |