답안 #496281

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
496281 2021-12-21T04:49:26 Z triplem5ds Password (RMI18_password) C++14
0 / 100
1 ms 284 KB
/// Zengy MANGA
#pragma GCC optimize("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx,avx2,fma")

#include "bits/stdc++.h"

using namespace std;

#define pb push_back
#define F first
#define S second
#define f(i, a, b)  for(int i = a; i < b; i++)
#define all(a)  a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define sz(x) (int)(x).size()
#define mp(x,y) make_pair(x,y)
#define popCnt(x) (__builtin_popcountll(x))

using ll = long long;
using ii = pair<int,int>;
using ull = unsigned long long;
using db = long double;

const int N = 2e5+5, LG = 18, MOD = 998244353;
const long double PI = acos(-1);

int query(string s);

string guess(int n, int s) {
    string ans = "";
    int cur = 0;
    for(char c = 'a'; c < 'a'+s; c++) {
        if(query(string(1,c)+ans) > cur) {
            ans = string(1,c) + ans;
            cur += 1;
        }   else if(query(ans + string(1,c)) > cur) {
            ans.pb(c);
            cur += 1;
        }
    }
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 200 KB Returned early from guess() after 28 queries.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 200 KB Returned early from guess() after 3 queries.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 284 KB Returned early from guess() after 14 queries.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 200 KB Returned early from guess() after 28 queries.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 200 KB Returned early from guess() after 28 queries.
2 Halted 0 ms 0 KB -