oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

grading Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

grading.html

Problem Description

Have you ever wondered why "minimum" is so incredibly easy? That is because for today, your role as a contestant will be switched! YAY! In fact, your program will now be grading another contestant's submission with testcases!

In this problem, you will implement a grader function, that when given a testcase for "minimum", will:

  1. Evaluate the testcase and calculate the correct answer.
  2. Call the contestant's findMin() function with the testcase to get his answer.
  3. Check if the answer is identical and output the relevant verdict.

There are three possible verdicts that you can return as a string to the caller function.
  1. "Accepted", which means the function has produced correct output within a time limit of 500 milliseconds.
  2. "Wrong Answer", which means that the function has produced incorrect output within a time limit of 500 milliseconds.
  3. "Time Limit Exceeded", which means the function has exceeded the time limit of 500 milliseconds allowed for the evaluation of this testcase.

Your program will be provided with the following functions:
  1. int findMin(int N, int A[]), which simulates the contestant's findMin() function
  2. void startTime(), which simulates the starting of a timer that can be used to detect TLE.
  3. int stopTime(), which returns you the number of milliseconds since the last startTime() was called.

Your program must implement the following functions:
  1. string gradeMin(int N, int A[]);, which, when called with a "minimum" testcase, will return the verdict of the contestant's function.

Input

Refer to the "minimum" input description.

Output

Refer to the "minimum" output description.

Limits

Refer to the "minimum" limits.

Tags

Syntax, Function Call

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
115501s64MBMinimum
235501s64MBMinimum
350501s64MBMinimum

Attachments

Attachment Filesize Last Updated
grading.h141B23 Jul 2013, 07:12:58
grader.cpp326B23 Jul 2013, 07:15:12
ans.cpp105B29 Oct 2013, 21:29:38

Judge Compile Command

g++-8 ans.cpp grader.cpp -o grading -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.