AtCoder Beginner Contest

  Рет қаралды 78

Code Today

Code Today

Күн бұрын

Пікірлер: 7
@PubgMerabeta
@PubgMerabeta 3 ай бұрын
in C why you use k+1 ? if we have to erase 3 number then why you take k+1 ? it will get the minimum of 4 erasing numbers, nah?
@lessonsoflife8835
@lessonsoflife8835 3 ай бұрын
Yes...you are correct. The loop actually goes till k only. In my template I have defined fr(i,j) to go from i to j-1. Sorry for the confusion.
@PubgMerabeta
@PubgMerabeta 3 ай бұрын
@@lessonsoflife8835 but bro when i go for (i=0 ; in>>k; vectorv(n) ,pre(n); mapmp; f(int i=0 ,i>v[i]; } vsort(v) ll mn = inf ; forint i=0 ,i
@PubgMerabeta
@PubgMerabeta 3 ай бұрын
@@lessonsoflife8835 ok ! but when i just iterate till k i got wa int mn = inf ; for(int i=0 ;i
@PubgMerabeta
@PubgMerabeta 3 ай бұрын
@@lessonsoflife8835 ok ! but in my code I do the same approach . go till k but got WA .. can you tell me why ? but when i go till k+1 its accepted.
@PubgMerabeta
@PubgMerabeta 3 ай бұрын
for(int i=0 ;i
Mastering Dynamic Programming - How to solve any interview problem (Part 1)
19:41
5 Simple Steps for Solving Any Recursive Problem
21:03
Reducible
Рет қаралды 1,2 МЛН
This dad wins Halloween! 🎃💀
01:00
Justin Flom
Рет қаралды 41 МЛН
SISTER EXPOSED MY MAGIC @Whoispelagheya
00:45
MasomkaMagic
Рет қаралды 19 МЛН
Я сделала самое маленькое в мире мороженое!
00:43
A* Search
12:32
John Levine
Рет қаралды 421 М.
Fundamentals of Vacuum in PostgreSQL: Module 1
12:06
Smart Postgres
Рет қаралды 971
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 812 М.
Should Computers Run the World? - with Hannah Fry
36:05
The Royal Institution
Рет қаралды 527 М.
Math for AI and ML: This strategy makes learning so much easy!
11:20
SOLVED: Perfect Reasoning for every AI AGENT (ReasonAgain)
24:55
This dad wins Halloween! 🎃💀
01:00
Justin Flom
Рет қаралды 41 МЛН