Submission #37383816


Source Code Expand

import sys
import numpy as np


# 入力
S = np.array([list(line.rstrip()) for line in sys.stdin.readlines()[1:]])

# NG[i][j] = (参加者iが問題jを解くことができないかどうか) N×M行列
NG = S == 'x'
# OK[i][j] = (参加者iと参加者jの組で全ての問題を解けるかどうか) N×N行列
OK = ~(NG @ NG.T)
# 答え = (OKのi < jとなる(i, j)成分のうち、Trueのものの個数)
answer = np.triu(OK, 1).sum()

print(answer)

Submission Info

Submission Time
Task B - Let's Get a Perfect Score
User math_hiyoko
Language Python (3.8.2)
Score 200
Code Size 472 Byte
Status AC
Exec Time 104 ms
Memory 27300 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 20
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt, 02_handmade_05.txt, 02_handmade_06.txt, 02_handmade_07.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 104 ms 26908 KiB
00_sample_02.txt AC 98 ms 27204 KiB
00_sample_03.txt AC 98 ms 27044 KiB
01_test_01.txt AC 101 ms 27016 KiB
01_test_02.txt AC 100 ms 27224 KiB
01_test_03.txt AC 100 ms 27000 KiB
01_test_04.txt AC 101 ms 26924 KiB
01_test_05.txt AC 99 ms 27240 KiB
01_test_06.txt AC 102 ms 27040 KiB
01_test_07.txt AC 97 ms 26756 KiB
01_test_08.txt AC 100 ms 26908 KiB
01_test_09.txt AC 98 ms 27024 KiB
01_test_10.txt AC 101 ms 27176 KiB
02_handmade_01.txt AC 103 ms 27300 KiB
02_handmade_02.txt AC 98 ms 27076 KiB
02_handmade_03.txt AC 102 ms 26812 KiB
02_handmade_04.txt AC 99 ms 27064 KiB
02_handmade_05.txt AC 102 ms 26852 KiB
02_handmade_06.txt AC 101 ms 27292 KiB
02_handmade_07.txt AC 98 ms 26792 KiB