注意到 \(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 題解
- Online Judge——1000.A+B Problem(c++)C++
- Codeforces Round #196 (Div. 2) B. Routine Problem
- YTU-OJ-Problem B: 抽象一個形狀類抽象
- Problem_2 Majority Problem
- hduoj1002 A + B Problem II (大數相加 字串模擬)字串
- 山科 STUST OJ Problem B: 編寫函式:String to Double (II) (Append Code)函式APP
- FZU Problem 1692 Key problem(迴圈矩陣)矩陣
- ACM A problem is easyACM
- Database Transaction ProblemDatabase
- Fixed "There was a problem with the editor 'vi'"
- STL iterator delete problemdelete
- HDU 1792 A New Change Problem
- Joe Harris is a real problem with this team
- The Door Problem 並查集並查集
- 3339: Rmq ProblemMQ
- ORB problem determinationORB
- 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"怎麼翻譯
- YTU-OJ-Problem J: B3 指向基類的指標訪問派生類的成員函式指標函式
- Solutions for Session Consistency Problem in Web ClusterSessionWeb
- Hdu 1792 A New Change Problem 結論
- POJ 2355 Railway Ticket problemAI
- Leetcode-Problem:Reverse IntegerLeetCode
- LeetCode-Water and Jug ProblemLeetCode
- hdu 1792 A New Change Problem(數論)
- Again, a chinese char conversion problemAI