Submission #74938778


Source Code Expand

import sys

def isOk(a, b):
    if a=='D' and b=='D':
        return True
    if a=='W' and b=='L':
        return True
    if a=='L' and b=='W':
        return True
    return False


n = int(input().strip())
a = [[0 for _ in range(n)] for _ in range(n)]

for i in range(n):
    l = input().strip()
    s = list(l)
    for j in range(len(s)):
        a[i][j] = s[j]

isCorrect = True
for i in range(n):
    for j in range(i + 1, n):
        if not isOk(a[i][j], a[j][i]):
            isCorrect = False

if isCorrect:
    print("correct")
else:
    print("incorrect")

Submission Info

Submission Time
Task C - Tournament Result
User Mishush
Language Python (PyPy 3.11-v7.3.20)
Score 200
Code Size 599 Byte
Status AC
Exec Time 161 ms
Memory 162752 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 18
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
random_01.txt AC 150 ms 162520 KiB
random_02.txt AC 152 ms 161864 KiB
random_03.txt AC 156 ms 162336 KiB
random_04.txt AC 154 ms 162184 KiB
random_05.txt AC 157 ms 162448 KiB
random_06.txt AC 150 ms 162240 KiB
random_07.txt AC 155 ms 162376 KiB
random_08.txt AC 103 ms 121152 KiB
random_09.txt AC 157 ms 162228 KiB
random_10.txt AC 102 ms 120784 KiB
random_11.txt AC 161 ms 162548 KiB
random_12.txt AC 96 ms 119324 KiB
random_13.txt AC 160 ms 162464 KiB
random_14.txt AC 151 ms 161720 KiB
random_15.txt AC 157 ms 162752 KiB
random_16.txt AC 98 ms 120616 KiB
sample_01.txt AC 55 ms 79804 KiB
sample_02.txt AC 53 ms 79932 KiB