RampOA #3
Banking System II (Optional Returns + Scheduled Payments + Merge)
估计困难评测数据准备中,可先阅读题面
Same 4-level structure as Problem 1, signatures use Optional<Integer> / Optional<String>.
Level 1
createAccount(ts, accountId) -> booleanOptional<Integer> deposit(ts, accountId, amount)Optional<Integer> transferMoney(ts, sourceAccountId, targetAccountId, amount)
Level 2 — Ranking
topSpenders(ts, n)— topnaccounts by total outgoing. Format"accountId(total)".
Level 3 — Scheduled Payments
schedulePayment(ts, accountId, amount, delay)— schedule a payment that executes atts + delay. ReturnspaymentNid.cancelScheduledPayment(ts, paymentId)— only if stillSCHEDULED.
Level 4 — Merge Accounts
boolean mergeAccounts(ts, accountId1, accountId2)Optional<Integer> getBalance(ts, accountId, timeAt)