問題一覧 > 通常問題

No.932 Solution Broken! Takahashi

レベル : / AI推定難易度 : 98 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 64 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 481
作問者 : leafirby / テスター : sakaki_tohru
お気に入りにしたユーザー ProblemId : 3670 / 自分の提出
問題文最終更新日: 2019-11-25 21:48:35
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 232 (順位表) の他の問題:

Problem Statement

Takahashi is the $writer$ of a certain problem. $Iot$, a tester, thought that Takahashi's solution looked a little suspicious.
So $Iot$ decided to add several test cases and check whether Takahashi's solution outputs the correct answers.
If the time limit is exceeded, "TLE" is written; if the memory limit is exceeded, "MLE" is written; if the answer is wrong, "WA" is written;
and if the answer is correct, "AC" is written, to the string $S$, separated by commas.
Given the string $S$, determine whether Takahashi's solution is correct. Here, the solution being correct means that $S$ contains no results other than "AC".

Input

$S$

$2\le |S|\le 4\times 10^5-1$
$S$ contains the result of each case ($1\le$ number of cases $\le 10^5$), separated by commas.
It is guaranteed that $S$ contains nothing other than results ("AC", "WA", "TLE", "MLE") and the "," between results,
and that it does not contain any rearrangements of these (e.g. "CA", "LTE", "LME", "A,CW,ATL", etc.).

Output

Output "Done!" if Takahashi's solution is correct and "Failed..." if it is wrong, followed by a newline.

Sample

Sample 1
Input
AC,AC,AC,AC,AC
Output
Done!

Takahashi's solution is correct.

Sample 2
Input
AC,AC,AC,AC,AC,WA,AC
Output
Failed...

Takahashi's solution was wrong.

Sample 3
Input
AC,AC,AC,TLE,TLE,TLE,TLE,MLE
Output
Failed...

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。