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

marker Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

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

marker.html

Spongebob and Patrick are having a competition. In their competition, they are supposed to solve simple math sums involving the subtraction and addition of 2 numbers. They decided to give each other a list of n such questions to complete.

Now, they have completed the questions and in order to ensure fairness, they want you to mark it. However, n can go up to 5000 resulting in that being a very tedious chore. You therefore decided to create a program to mark it for them!

Input

The first line of input is a single integer, n The following 2n lines is as follows: <Integer> <Operator> <Integer> = <Integer> The first n lines belong to Spongebob while the remaining n lines belong to Patrick.

Output

The program should output the number of correct equations Spongebob and Patrick have, respectively.

Grading

For 30% of the test cases, there will only be addition.
For 30% of the test cases, there will only be subtraction.
For 80% of the test cases, 1 <=n <= 100
For 100% of the test cases, 1 <= n <= 5000 and all numbers below 5000.
For 50% of the test cases, the numbers will all be positive.

Sample Input 1:

3
5 + 6 = 11
3 - 9 = 4
5 + -3 = 2
9 - 6 = 3
4 + 8 = 12
1 - 2 = -1

Sample Output 1:

Spongebob: 2
Patrick: 3

Tags

Syntax

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
1100101s32MBAverage
2011s32MBAverage

Judge Compile Command

g++-8 ans.cpp -o marker -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.