# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
781991 | Dan4Life | Data Transfer (IOI19_transfer) | C++17 | 4 ms | 2488 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
#define sz(a) (int)a.size()
vi get_attachment(vi v) {
int x = 0, y = 0, m = sz(v)<99?6:8; vi ans;
for(int i = 0; i < sz(v); i++) if(v[i]) x^=i+1;
for(int i = 0; i < m; i++)
ans.push_back((x>>i)&1), y^=ans.back();
ans.push_back(y); return ans;
}
vi retrieve(vi v){
int x = 0, xx = 0, y = 0, m = sz(v)<99?6:8, n=sz(v)<99?63:255;
for(int i = 0; i < n; i++) if(v[i]) x^=i+1;
for(int i = 0; i < m; i++) if(v[n+i]) xx^=1<<i, y^=1;
if(v.back()==y and x!=xx) v[(x^xx)-1]^=1; return v;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |