Please Help Me to find edge case in this problem

Правка en1, от noobCoderUltraProMax, 2023-01-20 09:41:39

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.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский noobCoderUltraProMax 2023-01-20 10:24:30 28 Tiny change: 'est 252.\n' -> 'est 252.\n\nEdit: i found the bug.\n\n'
en2 Английский noobCoderUltraProMax 2023-01-20 10:13:36 65
en1 Английский noobCoderUltraProMax 2023-01-20 09:41:39 789 Initial revision (published)