結果
問題 | No.607 開通777年記念 |
ユーザー | Kozuma |
提出日時 | 2018-01-18 23:18:36 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 420 bytes |
コンパイル時間 | 701 ms |
コンパイル使用メモリ | 10,924 KB |
実行使用メモリ | 58,880 KB |
最終ジャッジ日時 | 2023-08-25 21:29:03 |
合計ジャッジ時間 | 6,158 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 127 ms
29,360 KB |
testcase_02 | AC | 126 ms
29,416 KB |
testcase_03 | AC | 126 ms
29,312 KB |
testcase_04 | AC | 127 ms
29,420 KB |
testcase_05 | WA | - |
testcase_06 | AC | 125 ms
29,288 KB |
testcase_07 | TLE | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
ソースコード
import numpy as np def densya(): N, M = map(int, input().split()) n = np.zeros(N) ans = False for i in range(M): add = np.array(list(map(int, input().split()))) n = n + add for j in range(M): sum = 0 count = 0 while sum < 777: if j + count >= M: break sum += n[j + count] count += 1 if sum == 777: ans = True return ans if densya(): print("YES") else: print("NO")