# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
565518 | Rifal | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 3105 ms | 24276 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include <fstream>
#define endl '\n'
#define mod 32768
#define INF 100000000000000
//#define ll long long
//#define cin fin
//#define cout fout
using namespace std;
//ofstream fout("convention.out");
//ifstream fin("convention.in");
bool sta = false;
int arr[930][13];
void bu()
{
int cnt = 1;
for(int i = 0; i < (1<<12); i++)
{
int cc = 0;
for(int j = 0; j < 12; j++)
{
if((i&(1<<j)) > 0)
{
arr[cnt][j+1] = 1;
cc++;
}
else
{
arr[cnt][j+1] = 0;
}
}
if(cc == 6)
{
cnt++;
}
}
}
int encode (int n, int x, int y) {
if(!sta)
bu();
sta = true;
for(int i = 1; i <= 12; i++)
{
if(arr[x][i] == 1 && arr[y][i] == 0)
{
return i;
}
}
}
#include <bits/stdc++.h>
#include <fstream>
#define endl '\n'
#define mod 32768
#define INF 100000000000000
//#define ll long long
//#define cin fin
//#define cout fout
using namespace std;
//ofstream fout("convention.out");
//ifstream fin("convention.in");
bool sta = false;
int arr[930][13];
void bu()
{
int cnt = 1;
for(int i = 0; i < (1<<12); i++)
{
int cc = 0;
for(int j = 0; j < 12; j++)
{
if((i&(1<<j)) > 0)
{
arr[cnt][j+1] = 1;
cc++;
}
else
{
arr[cnt][j+1] = 0;
}
}
if(cc == 6)
{
cnt++;
}
}
}
int decode (int n, int q, int h) {
if(!sta)
bu();
sta = true;
return arr[q][h];
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |