結果
問題 | No.2662 Installing Cell Towers |
ユーザー | hato336 |
提出日時 | 2024-03-06 15:39:32 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 628 bytes |
コンパイル時間 | 473 ms |
コンパイル使用メモリ | 81,572 KB |
実行使用メモリ | 91,704 KB |
最終ジャッジ日時 | 2024-03-06 15:39:38 |
合計ジャッジ時間 | 5,632 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 138 ms
84,920 KB |
testcase_01 | AC | 123 ms
84,920 KB |
testcase_02 | AC | 123 ms
84,920 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | AC | 121 ms
84,920 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | AC | 122 ms
84,920 KB |
testcase_20 | AC | 121 ms
84,920 KB |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random #sys.setrecursionlimit(10**9) #sys.set_int_max_str_digits(0) input = sys.stdin.readline n,m = map(int,input().split()) check = [0 for i in range(n)] for i in range(m): p,q = map(int,input().split()) p -= 1 check[p] += q r = [0 for i in range(n)] temp = 0 for i in range(n): temp += check[i] r[i] = temp temp = max(temp-1,0) l = [0 for i in range(n)] temp = 0 for i in reversed(range(n)): temp += check[i] l[i] = temp temp = max(temp-1,0) for i in range(n): print(l[i]+r[i]-check[i],end=' ')