# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
494813 | ovidiush11 | Brperm (RMI20_brperm) | C++14 | 3 ms | 2392 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "brperm.h"
using namespace std;
std::string st;
void init(int n, const char s[])
{
st = s;
return;
}
int query(int i, int k)
{
for(int j = 0;j < pow(2,k);j++)
{
string a;
int n = j,p = k;
while(n != 0)
{
if(n % 2 == 1)a+='1';
else a+='0';
n/=2;
}
int x = a.size();
while(x != k){a+='0';x++;}
n = 0;
int y = 0;
while(y < x)
{
if(a[y] == '1')n += pow(2,x-y-1);
y++;
}
if(st[i+j] != st[i+n])return 0;
}
return 1;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |