No.1317 Monday Morning, I Got a WA
タグ : / 解いたユーザー数 103
作問者 : 👑
Kazun
/ テスター :
Note
In this problem, a result means one of 'AC', 'WA', 'TLE', 'MLE', 'OLE', 'RE' displayed for each test case after judging finishes.
Also, an incorrect answer means a result other than AC, that is, one of 'WA', 'TLE', 'MLE', 'OLE', 'RE'.
URL
* The following 5 URLs are all URLs on yukicoder. Also, these URLs have nothing to do with this problem.Problem Statement
You submitted a program to yukicoder, and it was judged as incorrect with the following results.
$\qquad$ AC: $A$ cases, WA: $W$ cases, TLE: $T$ cases, MLE: $M$ cases, OLE: $O$ cases, RE: $R$ cases
So you wrote a program that forcibly causes the result $X$ if and only if the input data satisfies a certain condition $\alpha$, and submitted it again.
When the condition is not satisfied, the program behaves in the same way as the program submitted first. Then,
the results were as follows.
$\qquad$ AC: $A'$ cases, WA: $W'$ cases, TLE: $T'$ cases, MLE: $M'$ cases, OLE: $O'$ cases, RE: $R'$ cases
In this situation, can you say with certainty that all test cases that received an incorrect answer in the first submission satisfy the condition $\alpha$? (Correction: 2020/12/14 0:30 Added a particle)
For this problem, assume the following.
- If the program before the change did not violate the execution time limit, the memory limit, or the file limit on a test case, then there is sufficient margin for each of them, and in the program after the change, these limits are not violated even with the added process of determining whether the condition $\alpha$ is satisfied.
- If multiple candidate results can be given for a test case in the program before the change, and that test case does not satisfy the condition $\alpha$, the result in the program after the change is the same as the result in the program before the change (Added the wording "candidate" 2020/12/14 00:13).
- In judging, all test cases are judged regardless of the results along the way.
- The number of test cases used for judging the programs before and after the change is the same, and the content of each test case is also the same.
- From the judge results, you can tell how many cases in total received each result, but you cannot tell which test case received which result.
Answer for $N$ test cases.
Constraints
- $1 \leq N \leq 10^4$
- $0 \leq A , W , T , M , O , R \leq 100$
- $W+T+M+O+R \neq 0$
- $0 \leq A', W', T', M', O', R' \leq 600$
- $W'+T'+M'+O'+R' \neq 0$
- $A+W+T+M+O+R=A'+W'+T'+M'+O'+R'$
- $X$ is one of '
WA', 'TLE', 'MLE', 'OLE', 'RE'. - Everything other than $X$ is an integer.
- Let $H_K, H_K'$ denote the number of test cases whose result was $K$ before and after the change, respectively. Then $H_K \geq H'_K$ if $K \neq X$, and $H_K \leq H'_K$ if $K=X$. (Correction: $X \to K$ 2020/12/14 00:24)
Input
The input is given from standard input in the following format.$N$
${\rm case}_1$
$\vdots$
${\rm case}_N$
Each case is given in the following format.
$A\ W\ T\ M\ O\ R$ $A'\ W'\ T'\ M'\ O'\ R'$ $X$
Output
Output $N$ lines. On the $i$-th line $(i=1,\dots, N)$, for the $i$-th test case, output 'Yes' if you can say with certainty that all test cases that received an incorrect answer in the first submission satisfy the condition $\alpha$, and 'No' if you cannot.
Print a newline at the end. (Correction: 2020/12/14 0:30 Added a particle)
Sample
Sample 1
Input
2 1 1 0 0 0 0 0 0 2 0 0 0 TLE 0 1 0 0 0 0 0 1 0 0 0 0 RE
Output
Yes No
- [About the 1st test case] Both of the two test cases satisfy the condition $\alpha$ and caused TLE. In particular, we can tell that the test case that resulted in WA also satisfies the condition $\alpha$.
- [About the 2nd test case] Since the results did not change, the test case that resulted in WA does not satisfy the condition $\alpha$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。