Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Language: Special Judge
Description John's college will hold a programming contest, and now it's calling for problems. John wants to contribute a problem to this contest. After finishing the problem, he found some trouble in verifying the programmer's output. For most programming problems, you can just compare the programmer's output against the correct answer, and if they are literally the same, the programmer's output is correct, otherwise it's wrong. But for this problem, there may be many correct answers and they can be different from each other literally. So John must write a program to verify programmers' output (We can call this program "Special Judge"). Soon, he found the Special Judge is too difficult for him, so he turns to you for help.
Here is the description of John’s original problem:
You will be given the input of the original problem and the output of a programmer, your task is to determine whether the programmer's output is correct or not. Input The input contains several test cases, and there are two sections in each test case. The first section is the original problem's input started by "#Start Input#" and ended by "#End Input#". The second section is the programmer's output started by "#Start Programmer's Output#" and ended by "#End Programmer's Output#". A line with "#End#" indicates the end of the input.
You can assume that all the data in the first section is valid, but the second section may contain anything except the string "#End Programmer's Output#". The valid programmer's output always contains 1 line, which means if you find that the programmer's output is less or more than 1 line, it's obviously wrong. Each line in the programmer's output will not exceed 2000 characters. Output For each test case output "Accepted" if the programmer's output is correct corresponding to the original problem, or "Wrong" if it's wrong. You should ignore the extra spaces or tabs ('\t') in the programmer's output and you can only ignore these 2 characters. Sample Input #Start Input# 3 -1 -1 1 3 -1 -1 #End Input# #Start Programmer's Output# 1 1 1 #End Programmer's Output# #Start Input# 10 -1 2 -1 3 -1 4 -1 5 -1 6 -1 7 -1 8 -1 9 -1 10 -1 -1 #End Input# #Start Programmer's Output# 512 256 128 64 32 16 8 4 2 89798 #End Programmer's Output# #End# Sample Output Accepted Wrong Hint If you use the functions "scanf" and "printf" to input and output 64bit integers, you should not use "%lld", but "%I64d". This is a bug of the windows version of GCC. Source |
[Submit] [Go Back] [Status] [Discuss]
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator