noobCoderUltraProMax's blog

By noobCoderUltraProMax, history, 23 months ago, In English

Problem Link:https://mirror.codeforces.com/contest/1779/problem/D

Code Link:https://mirror.codeforces.com/contest/1779/submission/189809516

Logic: i am using: first i am handling No case when v1[i]<v2[i], then i am storing count of all razors in a map. Now i iterate through 0 to n-1 and check if v1[i]>v2[i] if it so then i check if it the first time i have encountered this element, if yes then i need to use razor so i do mp[v2[i]]-- and update its position in other map, if it is not the first time then i range query from last position where i have seen that element to current position for max element. if it is greater than current element then i use razor an if it any moment mp[v2[i]] is required but it is 0 then i set bool flag var to false.

Difficulty: i am getting WA on test case 2 sub-test 252.

Edit: i found the bug.

Full text and comments »

By noobCoderUltraProMax, history, 2 years ago, In English

Hello Community, there are some bunch of users who have submitted at the same time here are some ss attached.Also i had browsed through only 2 pages of ranklist. do not know how many more will be there. What do you think of this? is it a delibrate attempt to inflate rating?

Full text and comments »

By noobCoderUltraProMax, history, 3 years ago, In English

My Code link:https://mirror.codeforces.com/contest/1678/submission/156355337

My Logic: Store all Pairs [Ai,Aj] where Ai>Aj in a 2D Vector and similarly do for Ai<Aj. Now Make 4 length arrays using these two arrays as they have required Pa < Pc and Pb>Pd pairs. If they meet the given condition check if position of elements of subsequence in original array is sorted or not using map, if sorted increment the answer.

Problem: It TLE's.

Thinking: I tired to think of optimization but unable to come up with. So can anyone help?

Full text and comments »