注意到 \(c_i=a_i+b_i+[a_j+b_j>9]\),其中 \(j\) 是大於 \(i\) 的最小的滿足 \(a_j+b_j\neq 9\) 的數。
這也意味著每次修改只能影響到 \(c\) 前面最靠後的滿足 \(a_i+b_i\neq 9\) 的位置。
用 set
維護 \(a_i+b_i\neq 9\) 的位置即可。細節較多。
QOJ6836 A Plus B Problem
相關文章
- P1865 A % B Problem
- A + B Problem II hd 1002
- HDU 1002 A + B Problem II
- [Algorithm] 1. A+B ProblemGo
- Online Judge——1000.A+B Problem(c++)C++
- CF741B:https://codeforces.com/problemset/problem/741/BHTTP
- 題解:AT_arc181_b [ARC181B] Annoying String Problem
- CF1934B Yet Another Coin Problem 題解
- 【簡單菊花圖】Codeforce 1583Problem - B.md
- hduoj1002 A + B Problem II (大數相加 字串模擬)字串
- The 2024 ICPC Asia EC Regionals Online Contest (II) - Problem B. Mountain BookingAI
- P1001 A+B Problem(整活-dijstra堆最佳化)JS
- Sum Problem
- Mathematical Problem
- Prime Ring Problem
- 2019 MCM Problem A
- Yet Another Problem
- Nanami and the Constructive ProblemNaNStruct
- Fixed "There was a problem with the editor 'vi'"
- Prime Ring Problem (dfs)
- HDU - 6182 A Math Problem
- Problem A. Ascending Rating
- E. Not a Nim Problem
- Nanami and the House Protecting ProblemNaN
- Follow/Unfollow problem in system design
- Euclid Problem - PC110703
- HDU 1792 A New Change Problem
- Joe Harris is a real problem with this team
- Assignment Problem的若干思考
- POJ 2355 Railway Ticket problemAI
- The Door Problem 並查集並查集
- Solutions for Session Consistency Problem in Web ClusterSessionWeb
- Problem 4:替換空格(字串)字串
- Problem E: 向量的刪除
- 解決git SSL certificate problemGit
- NC17383 A Simple Problem with Integers
- ECE 498/598 Associative Recall Problem
- ESTR1002 Problem Solving by Programming