| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 97027 | Kastanda | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++11 | 1908 ms | 125408 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// And I was like ooo-eee-ooo
#include<bits/stdc++.h>
#define pb push_back
using namespace std;
inline int Hash(int X, int Mod = 1997)
{
vector < int > A;
int M = X;
while (M)
A.pb(M % 3 + 19), M /= 3;
M = X;
while (M)
A.pb((M % 2 + 3) * 2 + 11), M /= 2;
int hsh = 0;
for (int a : A)
hsh = (hsh + a) * 1223 % Mod;
return hsh;
}
int encode(int N, int X, int Y)
{
return (Hash(X) % 12 + 1);
}
// White tiger's like ooo-aaa--oooo
#include<bits/stdc++.h>
#define pb push_back
using namespace std;
inline int Hash(int X, int Mod = 1997)
{
vector < int > A;
int M = X;
while (M)
A.pb(M % 3 + 19), M /= 3;
M = X;
while (M)
A.pb((M % 2 + 3) * 2 + 11), M /= 2;
int hsh = 0;
for (int a : A)
hsh = (hsh + a) * 1223 % Mod;
return hsh;
}
int decode(int N, int Q, int H)
{
if (Hash(Q) % 12 + 1 == H)
return 1;
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
