Skip to content

Commit 142d142

Browse files
authored
Merge pull request #162 from Thunyatorn/master
edit thaco_translator solution
2 parents afb874f + 19e5893 commit 142d142

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

md/thaco_translator.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ Time Complexity: $\mathcal{O}(NQ\log{N})$
4646

4747
เราจะมีอาร์เรย์ $dp$ ซึ่ง $dp(i)$ เท่ากับจำนวนครั้งที่น้อยที่สุดที่เราจะสามารถสลับแล้วทำให้ค่า $M$ มีค่าไม่เกิน $i$ ซึ่งเราจะสามารถคำนวณ $dp(i)$ โดยให้ตอนแรก $dp(i)=0$ สมมติว่า $p$ นั้นประกอบด้วยวงวนขนาด $C_1,C_2,C_3,\dots,C_v$ เราจะทำขั้นตอนดังต่อไปนี้
4848

49-
<!-- **for** $j\in\{1,2,\dots,v\}$ **do** <br>
50-
&ensp; &nbsp; **for** $i\in\{1,2,\dots,C_j\}$ **do** <br>
51-
&ensp; &ensp; &nbsp; &nbsp; $dp(i)\leftarrow dp(i)+\lceil\frac{C_j}{i}\rceil-1$ <br>
52-
&ensp; &nbsp; **end for** <br>
53-
**end for** -->
54-
5549
```cpp
5650
for j in (1, 2, ..., v) do
5751
for i in (1, 2, ..., C[j]) do

0 commit comments

Comments
 (0)