結果
| 問題 | No.2768 Password Crack |
| コンテスト | |
| ユーザー |
northward
|
| 提出日時 | 2024-06-01 02:19:00 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 578 bytes |
| 記録 | |
| コンパイル時間 | 510 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 35,524 KB |
| 平均クエリ数 | 1006.03 |
| 最終ジャッジ日時 | 2026-05-27 21:41:10 |
| 合計ジャッジ時間 | 8,992 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 WA * 24 |
ソースコード
import random
def main():
alphas = [chr(ord('a') + i) for i in range(26)]
ans = []
N = int(input())
for i in range(N):
random.shuffle(alphas)
T = ['a' for _ in range(N)]
counts_max = None
for x in alphas:
T[i] = x
print("? ", *T, sep="", flush=True)
c = int(input())
if counts_max is None:
counts_max = c
else:
if counts_max < c:
ans.append(x)
break
print("! ", *ans, sep='')
main()
northward