A-D | Educational Codeforces Round 163 Solutions | Tandem Repeats? | Arrow Path Array Fix | Abhinav

  Рет қаралды 4,979

Abhinav Awasthi

Abhinav Awasthi

Күн бұрын

Пікірлер: 67
@JamilAhmad-ld3br
@JamilAhmad-ld3br 7 ай бұрын
extra ordinary explanation
@AbhinavAwasthi
@AbhinavAwasthi 6 ай бұрын
Thanks a lot
@nandanbhowmick1825
@nandanbhowmick1825 7 ай бұрын
Problem C explanation was really good. Thanks a lot.
@AbhinavAwasthi
@AbhinavAwasthi 7 ай бұрын
Thanks a lot
@GauravDuseja-t6q
@GauravDuseja-t6q 8 ай бұрын
Very Good explanation bhaiya
@Voldemort-m8x
@Voldemort-m8x 2 ай бұрын
For problem C we can simply check one condition that if if we have '
@aankie
@aankie 8 ай бұрын
if i reach specialist...i will only come to salute you man..! glad i found you...regular viewer ...let see
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Sure bro, you will one day Keep trying 🙌🏻
@sainath5131
@sainath5131 8 ай бұрын
Helpfull
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Thanks
@shubhamdugar8249
@shubhamdugar8249 8 ай бұрын
great editorials. Solved C using DP
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Great thanks
@AbjSir
@AbjSir 8 ай бұрын
send code or tell your username on codeforces i'm curious
@mmbmmbmmb
@mmbmmbmmb 8 ай бұрын
send
@imteajsaimun4134
@imteajsaimun4134 8 ай бұрын
how pls explain
@saumyaranjan9256
@saumyaranjan9256 8 ай бұрын
@@imteajsaimun4134 void solve(){ ll t; cin>>t; while(t--){ ll n; cin>>n; bool dp[2][n]; memset(dp, false, sizeof(dp)); // tldr : 0123 dp[1][n-1] = true; vector a(2, vector(n)); for(ll i = 0; ix; if(x == '>'){ a[i][j] = 1; } else a[i][j] = -1; } } dp[0][n-1] = true; dp[1][n-2] = true; dp[0][n-2] = (a[1][n-2] == 1 ? true : false); vector dr = {-1, 0, 1}; vector dc = {0, 1, 0}; for(ll col = n-3; col>=0; col--){ for(ll row = 0; row
@itsmepratham2712
@itsmepratham2712 8 ай бұрын
ha ha at 27:31 i realized how easy the problem is and tricky
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
🙆🏻‍♂️😂
@codecreateriitp4751
@codecreateriitp4751 8 ай бұрын
Thanks bhaiya i like your 3rd question concept most of the people use dfs of this question
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Thanks 🙌🏻
@prime_great
@prime_great 8 ай бұрын
Sir in problem C If test case is like this >>< >
@ChiragWadwa
@ChiragWadwa 8 ай бұрын
n is always even
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Can you send the code
@prime_great
@prime_great 8 ай бұрын
@@AbhinavAwasthi sure.... #include using namespace std ; #define MOD 1000000007 ; typedef long long ll ; #define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) ; void solve(){ ll n ; cin>>n ; string str ; vector main ; cin>>str ; main.push_back(str) ; cin>>str ; main.push_back(str) ; vector dp(2 , vector (n , -1)) ; dp[0][n - 1] = 1 ; dp[1][n - 2] = 1 ; dp[1][n - 1] = 1 ; if(main[1][n - 2] == '>') dp[0][n - 2] = 1 ; for(int i = n - 3 ; i >= 0 ; i--){ if(main[0][i + 1] == '>'){ dp[0][i] = dp[0][i + 2] ; } if((dp[0][i] == -1 || dp[0][i] == 0) && main[1][i] == '>') dp[0][i] = dp[1][i + 1] ; if(dp[0][i] != 1){ dp[0][i] = 0 ; } if(main[1][i + 1] == '>') dp[1][i] = dp[1][i + 2] ; if((dp[1][i] == -1 || dp[1][i] == 0) && main[0][i] == '>') dp[1][i] = dp[0][i + 1] ; if(dp[1][i] != 1) dp[1][i] = 0 ; } if(dp[0][0] == 1) cout
@ChiragWadwa
@ChiragWadwa 8 ай бұрын
dude your testcase is invalid , n is even
@prime_great
@prime_great 8 ай бұрын
​​@@ChiragWadwa Ok I understand that part ... But I want to say that I am not checking that either (2 , n -2) is > .. then also mine code is working And also that it is not necessary that we should reach 2 , n by after second step only ... That is if we reach 2 , n by after first step only then also and must be yes.. It is like robot just want to touch that position of 2 , n
@sangamverma2042
@sangamverma2042 8 ай бұрын
C. ques [ > > < ][ > < < ] robot move (1,1) -> (1,2) -> (1,3) -> (2,3) finally reached but at (2,2) is '
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
How you are taking only 3 steps, there should be even steps, own step+cell step always taken as group, so after reaching 2,3 it will take own step and each 2,2
@_u_ya-dw6vx
@_u_ya-dw6vx 8 ай бұрын
@@AbhinavAwasthi sir, i am having the same doubt for the case: [ > < < ] [ > < < ] , this will output NO if I run your code, but it should be yes as we already reached the final state even though the cell step is not taken.. could you please clarify?
@Beingamanforever
@Beingamanforever 8 ай бұрын
in that robot question it might also happen that ki, the robot is present above (2,n) and then it takes its own step to go down and reach the final cell, how did we conclude that the last step would be by cell>?
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
If he will take own step to go down, he have to also take cell step, he can't skip, that will make him again on the left of destination
@Beingamanforever
@Beingamanforever 8 ай бұрын
@@AbhinavAwasthi understood sir, thank you, also sir can we ask doubts in the telegram channel?
@Nishkarsh-gc5yr
@Nishkarsh-gc5yr 8 ай бұрын
for C, can't we just do this, so we first check the initial 0 and n-1 index conditions, keep a variable cnt=0, and then iterate from the 1st and 2nd column and further like this pairwise, (1,2 -> 3,4 -> ... x,x+1 .. -> n-2, n-1), , and check if the odd index of first row is
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Have you tried this approach?
@AbjSir
@AbjSir 8 ай бұрын
I was able to do A,B,C in 58mins. Thanks sir
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Welcome
@shreyanshsinghal800
@shreyanshsinghal800 8 ай бұрын
very good approach in the c ques
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Thanks
@priyanshuhbtu
@priyanshuhbtu 8 ай бұрын
Nice Explanation ..I was only able to solve A,B 🥲
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Thanks, keep trying 🙌🏻
@gourabsarkar1706
@gourabsarkar1706 8 ай бұрын
thank you for Your Editorials ❤❤ and can you share how to make template like yours
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Thanks, sure will make
@jagan5785
@jagan5785 8 ай бұрын
in problem c, robot could have reached 0,n-1 by arrow(>) of 0,n-2 and from 0,n-1 it may reach to 1,n-1 by it's own step(move 1) isn't this a possibility
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
After own step he must take cell step also
@jagan5785
@jagan5785 8 ай бұрын
we have to reach 1,n-1 after 2 given steps ? @@AbhinavAwasthi
@AbjSir
@AbjSir 8 ай бұрын
sir you can use x=1-x; instead of x=(x+1)%2; I always use x=1-x; it's easier to write
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Yes, great
@rajonhassan8343
@rajonhassan8343 8 ай бұрын
great brother
@preetu391
@preetu391 8 ай бұрын
great editorials 🙌
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Thanks
@treasurehunter449
@treasurehunter449 8 ай бұрын
Great explanation for d problem
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Thanks
@nikhilsihare1887
@nikhilsihare1887 8 ай бұрын
i get the idea of D but not C 😢😢😢😢😢😢😢😢😢😢😢😢😢😢
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Keep trying 🙌🏻
@kashishchawla2754
@kashishchawla2754 8 ай бұрын
gr8
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Thanks
@pialhasan4550
@pialhasan4550 8 ай бұрын
sir give proper roadmap ... i am solve olny a pial5566 this in my codeforce id
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Sure, share will review when free
@RajGupta-cu9hi
@RajGupta-cu9hi 8 ай бұрын
Devin
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Ha haa
@relaxingnaturalvibrations1171
@relaxingnaturalvibrations1171 6 ай бұрын
I don't know why this brute force solution works in problem D. // !! om namah bhagwate vasudevay !! #include using namespace std; int main(){ int t; cin>>t; while(t--){ string s;cin>>s; int n=s.length(); int n1=n; if(n%2==1){ n1=n-1; } int ans=0; for(int i=2;i
@santoshvocals4781
@santoshvocals4781 8 ай бұрын
Mee seeing the video without solving even one question🥹
@AbhinavAwasthi
@AbhinavAwasthi 8 ай бұрын
Keep trying
@santoshvocals4781
@santoshvocals4781 8 ай бұрын
@@AbhinavAwasthi sure following ur videos I am a newbie will start
@Cpp_For_Life
@Cpp_For_Life 7 ай бұрын
​@@santoshvocals4781what's ur contest rating brother?
小路飞还不知道他把路飞给擦没有了 #路飞#海贼王
00:32
路飞与唐舞桐
Рет қаралды 79 МЛН
Trick-or-Treating in a Rush. Part 2
00:37
Daniel LaBelle
Рет қаралды 45 МЛН
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 206 МЛН
СКОЛЬКО ПАЛЬЦЕВ ТУТ?
00:16
Masomka
Рет қаралды 2,4 МЛН
Lab_ MATLAB Basics #swayamprabha #ch17sp
22:01
CH17: IIT BOMBAY 01: Biotechnology & Others
Рет қаралды 4
Longest Common Subsequence
53:51
BUILD_N_TRAVEL
Рет қаралды 12
小路飞还不知道他把路飞给擦没有了 #路飞#海贼王
00:32
路飞与唐舞桐
Рет қаралды 79 МЛН