| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 464485 | fuad27 | Password (RMI18_password) | C++17 | 1 ms | 200 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
//#include"grader.cpp"
using namespace std;
int query(string s);
int f[30];
string guess(int n, int s) {
string ans;
for (int i = 0; i < s; i++) {
char c = 'a' + i;
string q(n, c);
f[i] = query(q);
}
int st = 0;
for (int i = 0; i < s; i++) {
if (f[i] > 0) {
char c = i + 'a';
for (int j = 1; j <= f[i]; i++) {
ans += c;
}
st = i + 1;
break;
}
}
int curlen = ans.length();
for (int i = st; i < s; i++) {
char c = i + 'a';
string ch;
ch += c;
int pos = -1;
string q;
while (true) {
if (f[i] == 0) break;
if (pos == -1) {
q = ch + ans;
} else {
q = ans.substr(0, pos + 1) + ch;
q += ans.substr(pos + 1, curlen - pos - 1);
}
if (query(q) == curlen + 1) {
ans = q;
curlen++;
pos++;
f[i]--;
} else {
pos++;
}
if (pos >= curlen) break;
}
}
return ans;
}| # | 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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
