| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 28084 | abcdef6199 | Martian DNA (IOI16_dna) | C++98 | 13 ms | 2024 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "dna.h"
#include <bits/stdc++.h>
using namespace std;
struct Random {
int mul, add, mod, cur;
Random() {
mul = 1234567891;
add = 126126727;
mod = 1281231167;
cur = 0;
}
int NextRand(int n) {
cur = ((long long) cur * mul + add) % mod;
return cur % n;
}
} Random;
string analyse(int n, int t) {
string ans = "";
int cur = 0;
for (int i = 1; i <= n; ++i) {
int x = Random.NextRand(2);
if (make_test(ans + char(x + 48))) {
ans += char(x + 48);
cur = 0;
}
else {
ans += char(1 - x + 48);
cur++;
}
if (cur == 19) break;
}
int l = (int) ans.size() - cur + 1, r = (int) ans.size(), f = (int) ans.size() - cur;
while (l <= r) {
int mid = (l + r) >> 1;
if (make_test(ans.substr(0, mid))) {
f = mid;
l = mid + 1;
}
else r = mid - 1;
}
ans = ans.substr(0, f);
while (ans.size() < n) {
if (make_test("0" + ans)) ans = "0" + ans;
else ans = "1" + ans;
}
return ans;
}
컴파일 시 표준 에러 (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... | ||||
