Submission #3494184


Source Code Expand

Copy
import numpy as np

c = [list(map(int, input().split())) for i in range(3)]

A = np.array([
    [1, 0, 0, 1, 0, 0],
    [1, 0, 0, 0, 1, 0],
    [1, 0, 0, 0, 0, 1],
    [0, 1, 0, 1, 0, 0],
    [0, 1, 0, 0, 1, 0],
    [0, 1, 0, 0, 0, 1],
    [0, 0, 1, 1, 0, 0],
    [0, 0, 1, 0, 1, 0],
    [0, 0, 1, 0, 0, 1]])

B = np.array([
    [1, 0, 0, 1, 0, 0, c[0][0]],
    [1, 0, 0, 0, 1, 0, c[0][1]],
    [1, 0, 0, 0, 0, 1, c[0][2]],
    [0, 1, 0, 1, 0, 0, c[1][0]],
    [0, 1, 0, 0, 1, 0, c[1][1]],
    [0, 1, 0, 0, 0, 1, c[1][2]],
    [0, 0, 1, 1, 0, 0, c[2][0]],
    [0, 0, 1, 0, 1, 0, c[2][1]],
    [0, 0, 1, 0, 0, 1, c[2][2]]])

rankA = np.linalg.matrix_rank(A)
rankB = np.linalg.matrix_rank(B)

if rankA == rankB:
    print("Yes")
else:
    print("No")

Submission Info

Submission Time
Task C - Takahashi's Information
User yamakasa
Language Python3 (3.4.3)
Score 300
Code Size 780 Byte
Status
Exec Time 354 ms
Memory 23080 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_1.txt, sample_2.txt, sample_3.txt, sample_4.txt
All 300 / 300 in01.txt, in02.txt, in03.txt, in04.txt, in05.txt, in06.txt, in07.txt, in08.txt, in09.txt, in10.txt, in11.txt, in12.txt, in13.txt, in14.txt, in15.txt, in16.txt, in17.txt, in18.txt, in19.txt, in20.txt, sample_1.txt, sample_2.txt, sample_3.txt, sample_4.txt
Case Name Status Exec Time Memory
in01.txt 354 ms 23080 KB
in02.txt 187 ms 12404 KB
in03.txt 186 ms 14436 KB
in04.txt 189 ms 14436 KB
in05.txt 187 ms 14436 KB
in06.txt 185 ms 12500 KB
in07.txt 186 ms 14312 KB
in08.txt 185 ms 14436 KB
in09.txt 185 ms 12324 KB
in10.txt 186 ms 14436 KB
in11.txt 185 ms 12404 KB
in12.txt 188 ms 14436 KB
in13.txt 186 ms 12404 KB
in14.txt 185 ms 12500 KB
in15.txt 185 ms 12500 KB
in16.txt 185 ms 12500 KB
in17.txt 187 ms 12404 KB
in18.txt 185 ms 12404 KB
in19.txt 186 ms 12500 KB
in20.txt 186 ms 14436 KB
sample_1.txt 187 ms 12500 KB
sample_2.txt 187 ms 12404 KB
sample_3.txt 189 ms 12404 KB
sample_4.txt 187 ms 14404 KB