注意到 \(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
相關文章
- [Algorithm] 1. A+B ProblemGo
- LintCode-A+B Problem
- P1865 A % B Problem
- CF741B:https://codeforces.com/problemset/problem/741/BHTTP
- CF1934B Yet Another Coin Problem 題解
- 題解:AT_arc181_b [ARC181B] Annoying String Problem
- Online Judge——1000.A+B Problem(c++)C++
- Codeforces Round #196 (Div. 2) B. Routine Problem
- YTU-OJ-Problem B: 抽象一個形狀類抽象
- 【簡單菊花圖】Codeforce 1583Problem - B.md
- Problem_2 Majority Problem
- hduoj1002 A + B Problem II (大數相加 字串模擬)字串
- Mathematical Problem
- 山科 STUST OJ Problem B: 編寫函式:String to Double (II) (Append Code)函式APP
- P1001 A+B Problem(整活-dijstra堆最佳化)JS
- FZU Problem 1692 Key problem(迴圈矩陣)矩陣
- ACM A problem is easyACM
- Database Transaction ProblemDatabase
- Yet Another Problem
- The 2024 ICPC Asia EC Regionals Online Contest (II) - Problem B. Mountain BookingAI
- Fixed "There was a problem with the editor 'vi'"
- STL iterator delete problemdelete
- E. Not a Nim Problem
- HDU 1792 A New Change Problem
- Joe Harris is a real problem with this team
- The Door Problem 並查集並查集
- 3339: Rmq ProblemMQ
- ORB problem determinationORB
- Nanami and the Constructive ProblemNaNStruct
- Assignment Problem的若干思考
- Problem 4:替換空格(字串)字串
- A - Yet Another Two Integers Problem ACMACM
- NC17383 A Simple Problem with Integers
- HDU5293 : Tree chain problemAI
- 【poj3468】A Simple Problem with Integers
- google api , the problem of null refresh tokenGoAPINull
- Training - Problem and Change ManagementAI
- "toy problem"怎麼翻譯