제출 #852842

#제출 시각아이디문제언어결과실행 시간메모리
852842LucaLucaMPassword (RMI18_password)C++17
0 / 100
1 ms440 KiB
//#ifndef PASSWORD_H_INCLUDED
//#define PASSWORD_H_INCLUDED

#include <bits/stdc++.h>
#warning That's the baby, that's not my baby

typedef long long ll;

using namespace std;

int query (string str);

string guess (int n, int s) {
    string answer = "";
    while ((int) answer.size() < n) {
        int m = (int) answer.size();
        for (int i = 0; i < s; i++) {
            string q = answer;
            while ((int) q.size() < n) {
                q += char(i + 'a');
            }
            int k = query(q);
            if (k != m) {
                for (int j = m; j < k; j++) {
                    answer += char(i + 'a');
                }
                break;
            }
        }
        assert((int) answer.size() != m);
    }
    return answer;
}

//#endif // PASSWORD_H_INCLUDED

컴파일 시 표준 에러 (stderr) 메시지

password.cpp:5:2: warning: #warning That's the baby, that's not my baby [-Wcpp]
    5 | #warning That's the baby, that's not my baby
      |  ^~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...