結果
| 問題 | No.633 バスの運賃 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-15 19:59:41 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 536 ms / 2,000 ms |
| コード長 | 445 bytes |
| 記録 | |
| コンパイル時間 | 608 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 35,196 KB |
| 最終ジャッジ日時 | 2026-04-07 13:42:52 |
| 合計ジャッジ時間 | 6,934 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
ソースコード
import sys
sys.setrecursionlimit(100000000)
MOD = 10 ** 9 + 7
INF = 10 ** 15
import numpy as np
def main():
N = int(input())
A = np.array([input() for _ in range(N - 1)],np.int32)
count = np.zeros(N,np.int32)
bus = np.array([input().split() for _ in range(N)],np.int32)
count -= bus[:,0]
count += bus[:,1]
count = np.cumsum(count)
ans = np.dot(count[:-1],A)
print(ans)
if __name__ == '__main__':
main()