結果
| 問題 |
No.3068 Speedrun (Hard)
|
| コンテスト | |
| ユーザー |
回転
|
| 提出日時 | 2025-05-22 02:12:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
OLE
|
| 実行時間 | - |
| コード長 | 813 bytes |
| コンパイル時間 | 533 ms |
| コンパイル使用メモリ | 82,692 KB |
| 実行使用メモリ | 90,744 KB |
| 最終ジャッジ日時 | 2025-05-22 02:13:04 |
| 合計ジャッジ時間 | 8,221 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 OLE * 1 -- * 26 |
ソースコード
A,B,C,D,N = list(map(int,input().split()))
P,Q,R,S,T = list(map(int,input().split()))
for a in range(A+1):
for b in range(B+1):
nokori = N - (a+b)
nokori_t = T - (a*P+b*Q)
if(nokori < 0):break
if(nokori_t < 0):break
if(S != R):
d = (nokori_t - R*nokori)//(S-R)
c = nokori - d
if(c*R+d*S != nokori_t):continue
if(0 <= c <= C and 0 <= d <= D):
print(a,b,c,d)
exit()
else:
if(nokori*S != nokori_t):
print("hello")
continue
c = min(nokori,C)
nokori -= c
d = min(nokori,D)
if not (c >= 0 and d >= 0):continue
if(a+b+c+d == N):
print(a,b,c,d)
exit()
回転