結果

問題 No.393 2本の竹
ユーザー hiyokko2hiyokko2
提出日時 2016-07-30 17:40:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 376 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 32,140 KB
最終ジャッジ日時 2024-04-24 13:12:00
合計ジャッジ時間 3,139 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 40 ms
10,624 KB
testcase_04 WA -
testcase_05 AC 31 ms
10,752 KB
testcase_06 WA -
testcase_07 AC 42 ms
10,624 KB
testcase_08 AC 77 ms
10,880 KB
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

d = int(input())
for _ in range(d):
	n1, n2 = map(int, input().split())
	input()
	A = sorted(map(int, input().split()))

	ans = 0
	syugo = {(n1, n2)}
	for a in A:
		if syugo == set():
			break
		new_syugo = set()
		for x, y in syugo:
			if x - a >= 0:
				new_syugo.add((x - a, y))
			if y - a >= 0:
				new_syugo.add((x, y - a))
		syugo = new_syugo
		ans += 1
	print(ans - 1)
0