結果
| 問題 | No.3534 Make Many Fences |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-18 15:10:59 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 635 bytes |
| 記録 | |
| コンパイル時間 | 552 ms |
| コンパイル使用メモリ | 20,572 KB |
| 実行使用メモリ | 30,452 KB |
| 最終ジャッジ日時 | 2026-05-18 15:11:16 |
| 合計ジャッジ時間 | 5,102 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 3 TLE * 1 -- * 5 |
ソースコード
T = int(input())
for _ in range(T):
N, M = map(int, input().split())
Z = 0
if N == 0:
Z = 0
elif M == 0:
while N >= 2:
N = N - 2
M = M + 4
if M >= 2:
N = N - 4
M = M - 2
Z = Z + 1
else:
S1 = (N // 4)
S2 = (M // 2)
if S1 > S2:
while N >= 2:
N = N - 2
M = M + 4
if M >= 2:
N = N - 4
M = M - 2
Z = Z + 1
else:
Z = (N // 4) * 3
print(Z)