| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1366864 | abgfd324 | Data Transfer (IOI19_transfer) | C++20 | 5 ms | 3256 KiB |
#include<iostream>
#include<vector>
using namespace std;
vector<int> get_attachment(vector<int> source)
{
int x = 0;
int maxi, maxj;
if(source.size() == 63)
{
maxi = 6;
maxj = 63;
}
else
{
maxi = 8;
maxj = 255;
}
for(int i = 0; i < maxi; i++)
{
int cur = 0;
for(int j = 1; j <= maxj; j++)
{
if(((j>>i)&1) == 1)
{
cur^=source[j-1];
}
}
x^=cur;
source.push_back(cur);
}
source.push_back(x);
return source;
}
vector<int> retrieve(vector<int> data)
{
int x = 0;
int pr = 0;
for(int i = 63; i < 69; i++) x^=data[i];
if(data[69] != x)
{
for(int i = 0; i < 7; i++) data.pop_back();
return data;
}
else
{
for(int i = 0; i < 6; i++)
{
int cur = 0;
for(int j = 1; j <= 63; j++)
{
if(((j>>i)&1) == 1)
{
cur^=data[j-1];
}
}
if(cur != data[63+i])
{
pr|=(1<<i);
}
}
if(pr != 0) data[pr-1]^=1;
for(int i = 0; i < 7; i++) data.pop_back();
return data;
}
}컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
