QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#754348 | #9552. The Chariot | 怎么有退役选手还参加这个的 (Yaoyu Pan)# | Compile Error | / | / | C++20 | 968b | 2024-11-16 14:50:30 | 2024-11-16 14:50:30 |
Judging History
This is the latest submission verdict.
- [2024-11-16 14:50:30]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-11-16 14:50:30]
- Submitted
answer
import sys
input = sys.stdin.readline
for _ in range(int(input())):
A, B, C, X, Y, D = map(int, input().split())
# 全用A
ans = ((D + X - 1) // X) * A
# 全用A, 如果有余数用B补齐
if D > A and D % A:
t = (D // X) * A
t += (D % X) * B
# A + B, 然后全用C
if D > X:
if D <= X + Y:
t = A + B * (D - X)
if t < ans: ans = t
else:
t = A + B * Y + (D - X - Y) * C
if t < ans: ans = t
# 不断重复 A + B
cnt = D // (X + Y)
t = cnt * (A + B * Y)
if D % (X + Y):
r = D % (X + Y)
if r <= X:
t += A
else:
t += A + (r - X) * B
if t < ans: ans = t
## 不断重复A + B, 但是如果有余数用C补齐
if D > X + Y:
cnt = D // (X + Y)
t = cnt * (A + B * Y)
t += (D % (X + Y)) * C
if t < ans: ans = t
print(ans)
Details
answer.code:7:7: error: invalid preprocessing directive #\U00005168\U00007528A 7 | # 全用A | ^~~~~ answer.code:9:7: error: invalid preprocessing directive #\U00005168\U00007528A 9 | # 全用A, 如果有余数用B补齐 | ^~~~~ answer.code:13:7: error: invalid preprocessing directive #A 13 | # A + B, 然后全用C | ^ answer.code:21:7: error: invalid preprocessing directive #\U00004e0d\U000065ad\U000091cd\U0000590d 21 | # 不断重复 A + B | ^~~~~~~~ answer.code:31:5: error: stray ‘##’ in program 31 | ## 不断重复A + B, 但是如果有余数用C补齐 | ^~ answer.code:1:1: error: ‘import’ does not name a type 1 | import sys | ^~~~~~ answer.code:1:1: note: C++20 ‘import’ only available with ‘-fmodules-ts’, which is not yet enabled with ‘-std=c++20’