No.932 Solution Broken! Takahashi
タグ : / 解いたユーザー数 481
作問者 :
leafirby
/ テスター :
sakaki_tohru
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もしくは右上の雲マークをクリックしてアカウントを作成してください。