結果

問題 No.489 株に挑戦
ユーザー 6soukiti296soukiti29
提出日時 2017-03-20 18:08:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 334 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 10,848 KB
実行使用メモリ 12,888 KB
最終ジャッジ日時 2023-09-22 20:07:04
合計ジャッジ時間 5,776 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 204 ms
7,976 KB
testcase_01 AC 142 ms
9,192 KB
testcase_02 AC 16 ms
7,776 KB
testcase_03 AC 16 ms
7,936 KB
testcase_04 AC 16 ms
7,908 KB
testcase_05 AC 16 ms
7,780 KB
testcase_06 AC 16 ms
7,744 KB
testcase_07 AC 16 ms
7,828 KB
testcase_08 AC 15 ms
7,904 KB
testcase_09 AC 16 ms
7,792 KB
testcase_10 AC 15 ms
7,788 KB
testcase_11 AC 16 ms
7,804 KB
testcase_12 AC 16 ms
7,840 KB
testcase_13 AC 16 ms
7,888 KB
testcase_14 AC 15 ms
7,792 KB
testcase_15 AC 28 ms
7,744 KB
testcase_16 AC 233 ms
9,236 KB
testcase_17 AC 51 ms
7,904 KB
testcase_18 AC 140 ms
8,448 KB
testcase_19 AC 115 ms
8,624 KB
testcase_20 AC 236 ms
10,468 KB
testcase_21 AC 70 ms
8,856 KB
testcase_22 AC 35 ms
7,800 KB
testcase_23 AC 154 ms
8,332 KB
testcase_24 AC 276 ms
10,468 KB
testcase_25 AC 16 ms
7,740 KB
testcase_26 AC 236 ms
7,792 KB
testcase_27 AC 242 ms
8,308 KB
testcase_28 AC 16 ms
7,880 KB
testcase_29 AC 16 ms
7,912 KB
testcase_30 AC 271 ms
11,120 KB
testcase_31 AC 308 ms
12,888 KB
testcase_32 AC 151 ms
8,420 KB
testcase_33 AC 261 ms
9,904 KB
testcase_34 AC 234 ms
8,840 KB
testcase_35 AC 102 ms
8,408 KB
testcase_36 AC 51 ms
8,580 KB
testcase_37 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,D,K = list(map(int,input().split()))
i = 0
j = 0
A = [0,0,0]
J = [10**6]
while i < N:
	
	l = int(input())
	j = J[0]
	if l > j:
		if A[2] < l - j:
			A = [i,len(J),l - j]

		J.append(l)
		if len(J) > D:
			J.pop(0)
			j = min(J)
			J = J[J.index(j):]
			
	else:
		J = [l]
	i = i + 1
print(A[2]*K)
if A[2] != 0:
	print(A[0]-A[1],A[0])
0