結果
| 問題 |
No.230 Splarraay スプラレェーイ
|
| コンテスト | |
| ユーザー |
るさ
|
| 提出日時 | 2018-05-31 19:27:05 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 540 bytes |
| コンパイル時間 | 98 ms |
| コンパイル使用メモリ | 12,928 KB |
| 実行使用メモリ | 13,888 KB |
| 最終ジャッジ日時 | 2024-06-30 08:36:42 |
| 合計ジャッジ時間 | 8,695 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 TLE * 1 -- * 10 |
ソースコード
n=int(input())
q=int(input())
field=[0 for i in range(n)]
bscore=[0,0]
for i in range(q):
inq=list(map(int,input().split()))
if inq[0]:
field[inq[1]:inq[2]+1]=[inq[0] for j in range(inq[1],inq[2]+1)]
else:
acnt=sum(map(lambda x:x==1,field[inq[1]:inq[2]+1]))
bcnt=sum(map(lambda x:x==2,field[inq[1]:inq[2]+1]))
if acnt!=bcnt:
bscore[int(acnt<bcnt)]+=max([acnt,bcnt])
asc=bscore[0]+sum(map(lambda x:x==1,field))
bsc=bscore[1]+sum(map(lambda x:x==2,field))
print(str(asc)+" "+str(bsc))
るさ