Today I faced a problem in "Codeforces Round 794 (Div. 1)" which I didn't solve yet, but felt that I've solved it before , after a little searching I found that it's existed before in "Educational Codeforces Round 174 (Rated for Div. 2)" with a 99.9% similarity in the solution !!!!
Here is the older version : https://codeforces.net/problemset/problem/1685/B
Solution 1: https://codeforces.net/contest/1685/submission/311499198
The newer one : https://codeforces.net/contest/2069/problem/E
Solution 2: https://codeforces.net/contest/2069/submission/311500284
I see no issues here