C. Manhattan Permutations Codeforces Round 953 (Div. 2)

  Рет қаралды 335

Jeevan Alexen Kavalam

Jeevan Alexen Kavalam

Күн бұрын

Пікірлер: 10
@-ArnobBiswas
@-ArnobBiswas 4 ай бұрын
Consider the case n=5 and k=12, so in the first iteration we are looking in the set for the value 6+1=7, which should return st.end() and dereferencing it should give a garbage value unless we handle this case. I don't understand how did it get accepted.
@mennaselim409
@mennaselim409 5 ай бұрын
Thanks for this explanation. Do you have any recommendations for improving observation skills?
@jeevanalexen
@jeevanalexen 5 ай бұрын
Not really, I have explained how I observed the observations in the problem, it was either by trying to find a pattern or trying to think in terms of how I have solved similar problems previously.
@jeevanalexen
@jeevanalexen 5 ай бұрын
We're you able to understand my explanation properly?
@mennaselim409
@mennaselim409 5 ай бұрын
@@jeevanalexen yup I was able to understand your explanation, thanks a lot, but I am not able to make good observation and notice the pattern. is it improved by practice or is there technique to do this?
@jeevanalexen
@jeevanalexen 5 ай бұрын
​@@mennaselim409it can be improved only by practise.
@deboshrutimukhopadhyay7925
@deboshrutimukhopadhyay7925 4 ай бұрын
could you explain why this code is not getting accepted though I went with a similar approach #include using namespace std; #define ll long long int main() { int t; cin >> t; while (t--) { long long n, k; cin >> n >> k; // Check if k is odd if (k % 2 != 0) { cout
@vedanta-xw3se
@vedanta-xw3se 5 ай бұрын
why are u using remain + i + 1 why not just remain
@jeevanalexen
@jeevanalexen 5 ай бұрын
Because we are doing val - (i+1) below, there we subtract i+1 from val. So to negate that, we are taking remain + i + 1, so that the subtraction below wont affect it.
@jeevanalexen
@jeevanalexen 5 ай бұрын
Please let me know if you need further explanation
C. Job Interview Educational Codeforces Round 166 (Rated for Div. 2)
28:46
Jeevan Alexen Kavalam
Рет қаралды 1,3 М.
ТЫ В ДЕТСТВЕ КОГДА ВЫПАЛ ЗУБ😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 4,1 МЛН
Ice Cream or Surprise Trip Around the World?
00:31
Hungry FAM
Рет қаралды 19 МЛН
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,4 МЛН
Codeforces Round 943 (Div 3) | Video Solutions - A to G1 | by Viraj Chandra | TLE Eliminators
2:04:35
E. Permutation of Rows and Columns Codeforces Round 950 (Div. 3)
20:56
Jeevan Alexen Kavalam
Рет қаралды 121
Machine Learning for Everybody - Full Course
3:53:53
freeCodeCamp.org
Рет қаралды 7 МЛН
Complete Dynamic Programming Practice - Noob to Expert | Topic Stream 1
3:50:43
Math for Game Devs [2022, part 1] • Numbers, Vectors & Dot Product
3:57:35
Winning Facebook (Meta) Hacker Cup Qual Round 2022?
53:55
Neal Wu
Рет қаралды 2,6 МЛН
????? How To Solve Problems Like Find Permutation
14:03
Mahmoud Ayman | | محمود أيمن
Рет қаралды 4,5 М.
ТЫ В ДЕТСТВЕ КОГДА ВЫПАЛ ЗУБ😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 4,1 МЛН