Problem C | Tea tasting | codeforces educational round 143

  Рет қаралды 2,849

A Code Daily!

A Code Daily!

Күн бұрын

Пікірлер: 10
@Acodedaily
@Acodedaily Жыл бұрын
Common discord group- discord.gg/P5TEZB4zAr (Beginners) The new coders- discord.gg/4DH3PWUX3t (Intermediate) Pro coders- discord.gg/H8TeFjvq6z
@OnlyAyushAgarwal
@OnlyAyushAgarwal 7 ай бұрын
Nice
@natechen4
@natechen4 Жыл бұрын
lmao ur sacrificing the last 40 minutes of making a tutorial.🤣But great works btw! Came here with your comment and this helps a lot!
@Acodedaily
@Acodedaily Жыл бұрын
Haha. I always do this. Thanks for supporting
@aaravarya4406
@aaravarya4406 Жыл бұрын
Initially I thought of the similar solution, but somewhere it wasn't working for me. Then I did it using difference array, it seemed more intuitive.
@huzaifaansari6195
@huzaifaansari6195 Жыл бұрын
bro can you please share ur code that u did using difference array
@aaravarya4406
@aaravarya4406 Жыл бұрын
@@huzaifaansari6195 I hope I ain't too late, here's the code. Maybe the code is Lil messy , if it's unclear to you plz let me know I can put down the approach. #include using namespace std; #define endl " " #define ll long long int #define vi vector #define KIT ios_base::sync_with_stdio(false),cin.tie(NULL) #define all(type) type.begin(), type.end() int32_t main() { KIT; int ttt; ttt=1; cin>>ttt; while(ttt--){ ll n; cin>>n; vector tea(n), tester(n); for(auto &x:tea)cin>>x; for(auto &x:tester)cin>>x; vi v(n+5,0), extra(n+5,0), prefix(n); prefix[0]=tester[0]; for(int i=1; i
@Everyday_smarter
@Everyday_smarter Жыл бұрын
hey i don't know what wrong with this approach 🥲 when i'm submitting it's showing wrong on fifth test case i can't find any mistake in code even i tried exactly code what u have shown in video it's not accepting my code : #include using namespace std; int main() { int t; cin>>t; while(t--) { int n; cin>>n; vector a(n); vector b(n); for(int i=0; i>a[i]; for(int i=0; i>b[i]; long long used=0; multiset s; for(int i=0; i
@Acodedaily
@Acodedaily Жыл бұрын
overflow probably ... use long long instead of int
@Everyday_smarter
@Everyday_smarter Жыл бұрын
fine ! got the mistake ! i used int for set instead of long long
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 60 МЛН
Car Bubble vs Lamborghini
00:33
Stokes Twins
Рет қаралды 37 МЛН
World’s strongest WOMAN vs regular GIRLS
00:56
A4
Рет қаралды 26 МЛН
PIZZA or CHICKEN // Left or Right Challenge
00:18
Hungry FAM
Рет қаралды 12 МЛН
Codeforces Round 888 (Div. 3) | Problems A-E
47:28
A Code Daily!
Рет қаралды 1,6 М.
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 342 М.
Yet Another Tournament || Codeforces Educational Round 141 Div2 Problem C
15:17
Competitive Coding - Newton School
Рет қаралды 2,3 М.
Min-Max Array Transformation || Codeforces Educational Round 134 Div2 Problem C
19:57
Competitive Coding - Newton School
Рет қаралды 4,2 М.
why are switch statements so HECKIN fast?
11:03
Low Level
Рет қаралды 425 М.
Don't Model the Problem
14:32
David Hart
Рет қаралды 30 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 180 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 830 М.
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 60 МЛН