Submission #9459866


Source Code Expand

Copy
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,M = map(int,readline().split())
PS = [line.split() for line in readlines()]

AC = [False] * (N+1)
WA_cnt = [0] * (N+1)

penal = 0
for p,s in PS:
    p = int(p)
    if AC[p]:
        continue
    if s == b'WA':
        WA_cnt[p] += 1
    else:
        AC[p] = True
        penal += WA_cnt[p]

ac = sum(AC)
print(ac, penal)

Submission Info

Submission Time
Task C - Welcome to AtCoder
User maspy
Language Python (3.4.3)
Score 300
Code Size 463 Byte
Status AC
Exec Time 148 ms
Memory 34468 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 17
Set Name Test Cases
Sample 00-sample-00, 00-sample-01, 00-sample-02
All 00-sample-00, 00-sample-01, 00-sample-02, 01-handmade-03, 01-handmade-04, 01-handmade-05, 01-handmade-06, 02-small-07, 02-small-08, 02-small-09, 02-small-10, 02-small-11, 03-large-12, 03-large-13, 03-large-14, 03-large-15, 03-large-16
Case Name Status Exec Time Memory
00-sample-00 AC 17 ms 3064 KB
00-sample-01 AC 20 ms 4596 KB
00-sample-02 AC 17 ms 3064 KB
01-handmade-03 AC 115 ms 29732 KB
01-handmade-04 AC 148 ms 34468 KB
01-handmade-05 AC 126 ms 29732 KB
01-handmade-06 AC 108 ms 29732 KB
02-small-07 AC 116 ms 32420 KB
02-small-08 AC 105 ms 30756 KB
02-small-09 AC 110 ms 32036 KB
02-small-10 AC 112 ms 31652 KB
02-small-11 AC 109 ms 30500 KB
03-large-12 AC 126 ms 33316 KB
03-large-13 AC 134 ms 32416 KB
03-large-14 AC 129 ms 31396 KB
03-large-15 AC 131 ms 32416 KB
03-large-16 AC 137 ms 34340 KB