# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
742838 | nguyentunglam | Data Transfer (IOI19_transfer) | C++17 | 5 ms | 2492 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "transfer.h"
#include<bits/stdc++.h>
using namespace std;
void up(int &pos) {
pos++;
while (__builtin_popcount(pos) > 1) pos++;
}
std::vector<int> get_attachment(std::vector<int> source) {
int T = source.size() <= 63 ? 7 : 9;
vector<int> ret(T);
int pos = 0;
for(int &val : source) {
up(pos);
// for(int j = 0; j < T; j++) if (pos >> j & 1) ret[j] ^= val;
}
return ret;
}
std::vector<int> retrieve(std::vector<int> data) {
// int T = data.size() - 7 <= 63 ? 7 : 9;
// int n = data.size() - T;
vector<int> ret;
// int pos = 0;
// for(int i = 0; i < n; i++) {
// up(pos);
// for(int j = 0; j < T; j++) if (pos >> j & 1) data[j + n] ^= data[i];
// }
// int wrong = 0;
// pos = 0;
// for(int j = 0; j < T; j++) if (data[j + n]) wrong |= (1 << j);
// for(int i = 0; i < n; i++) {
// up(pos);
// if (pos == wrong) data[i] ^= 1;
// ret.push_back(data[i]);
// }
return ret;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |