Codeforces Round 961 | Video Solutions - A to B2 | by Harsh Gupta | TLE Eliminators

  Рет қаралды 3,036

TLE Eliminators - by Priyansh

TLE Eliminators - by Priyansh

Күн бұрын

Пікірлер: 12
@TLE_Eliminators
@TLE_Eliminators Ай бұрын
🎓 Learn from the best! TLE 11.0 offers live classes with top mentors. Join TLE 11.0 today at www.tle-eliminators.com 🚀
@pakalapaticharanraju523
@pakalapaticharanraju523 Ай бұрын
bro the explanation is really awesome bro yesterday when i tried to do the problem i cant even able to understand what the question is but just after the explanation i started solving it and it just got accepted thank bro thank you so much
@MATRIX-404
@MATRIX-404 Ай бұрын
Thanks 😊
@TLE_Eliminators
@TLE_Eliminators Ай бұрын
Please fill the feedback form: forms.gle/fdnL3vQG2M8892qUA
@jiakai7254
@jiakai7254 Ай бұрын
for B1 can i use kadane’s algorithm with two constraints: max sum is m and a[i]-min(subarr)
@akzytr
@akzytr Ай бұрын
No because that means we want to greedily choose as a subarray, this won't work as we don't want to set the current cost to 0 as soon as we can't add more elements within budget for example: Suppose budget is 1033 and we have the following: 206 206 206 206 207 207 207 Using kadane's algorithm: Index 1: 206 Index 2: Prev + 206 = 412 Index 3: Prev + 206 = 618 Index 4: Prev + 206 = 824 Index 5: Prev + 207 = 1031 Index 6: We cannot add more since 1031 + 207 > 1033, so we have to restart and now Prev = 207 Index 7: Prev + 207 = 414 Index 8: Prev + 207 = 621 So according to Kadane's algorithm the maximum is 1031 which we can achieve within budget. It is wrong, because we can take 1033, with 2 of 206, and 3 of 207 so 206+206+207+207+207 = 1033
@jojokawai5841
@jojokawai5841 Ай бұрын
hey , which rating questions should i grind to get comfortable with div2 B probelms
@AB-yl5sz
@AB-yl5sz Ай бұрын
Solve div 2 b problem of last 40-50 contest
@joj0ukey31
@joj0ukey31 Ай бұрын
​@@AB-yl5szwhere to see all past div 2 contest in sequence
@Animal-O-hub341
@Animal-O-hub341 Ай бұрын
​@@joj0ukey31contest section of cf
@jojokawai5841
@jojokawai5841 Ай бұрын
@@AB-yl5sz where can i see them
@yashanil2818
@yashanil2818 Ай бұрын
#include using namespace std; typedef long long ll; typedef vector vi; typedef vector vll; #define rep(i, a, b) for (long long int i = a; i < b; i++) void solve() { ll n, k; cin >> n >> k; map mp; rep(i, 0, n) { ll x; cin >> x; mp[x]++; } ll ans = 0; for (auto i : mp) { ll l = i.first; ll r = l + 1; if (l k) { if (r && sum - r == k) { cout t; while (t--) { solve(); cout
Leetcode Weekly Contest 413 | Video Solutions - A to D | by Harsh Gupta | TLE Eliminators
1:05:36
Codeforces Round 971 (Div 4) | Video Solutions - A to G1 | by Gaurish Baliga | TLE Eliminators
1:46:24
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 198 МЛН
Unveiling my winning secret to defeating Maxim!😎| Free Fire Official
00:14
Garena Free Fire Global
Рет қаралды 16 МЛН
What will he say ? 😱 #smarthome #cleaning #homecleaning #gadgets
01:00
Top Chrome Extensions for Best Experience on Codeforces
8:01
Priyansh Agarwal
Рет қаралды 52 М.
Codeforces Round 963 | Video Solutions - A to C | by Harsh Gupta | TLE Eliminators
1:11:44
TLE Eliminators - by Priyansh
Рет қаралды 3,8 М.
A. Buying Torches ||  Educational Codeforces Round 95 || CODDEFORCES
7:33
The Mathematician Who Discovered Math's Greatest Mystery
12:21
Newsthink
Рет қаралды 217 М.
Delivering Safe C++ - Bjarne Stroustrup - CppCon 2023
1:29:16
3 Signs of an Inexperienced Programmer | Avoid these in Tech
9:02
Apna College
Рет қаралды 466 М.
50+ LPA Roadmap | ezSnippet | Neeraj Walia
17:02
Neeraj Walia
Рет қаралды 1,2 МЛН
Leetcode Weekly Contest 412 | Video Solutions - A to D | by Viraj Chandra | TLE Eliminators
1:13:53