# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1262241 | miniob | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++20 | 495 ms | 39552 KiB |
#include <bits/stdc++.h>
using namespace std;
vector<int> maska;
int encode(int n, int x, int y)
{
if(maska.size() == 0)
{
for(int i = 0; i < 1 << 12; i++)
{
bitset<12> temp = i;
if(temp.count() == 6)
{
maska.push_back(i);
}
}
}
for(int i = 0; i < 12; i++)
{
if((maska[x] & (1 << i)) > 0 && (maska[y] & (1 << i)) == 0)
{
//cout << i + 1 << endl;
return i + 1;
}
}
//cout << (maska[L] & (1 << 4)) << endl;
//cout << maska[L] << " " << maska[P] << endl;
//cout << "kon" << endl;
}
#include <bits/stdc++.h>
using namespace std;
vector<int> maska;
int decode(int n, int q, int h)
{
if(maska.size() == 0)
{
for(int i = 0; i < 1 << 12; i++)
{
bitset<12> temp = i;
if(temp.count() == 6)
{
maska.push_back(i);
}
}
}
return (maska[q] & (1 << (h - 1)));
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |