While solving I find some problems which I couldn't solve after hard trying with them ; so for such problems I'm confused ..
which is better in that case ?
A- Push the problem to my to-do list , keep going solving other problems and return back to solve it later after a while . Maybe after solving other problems , and after solving it read the editorial and figure out what went wrong with me that made me unable to solve it the first time . If after I return to solve it and couldn't solve it again : repeat A .
B- After I'm completely done with the problem and I'm no longer making any progress with it , I start read the editorial , find what's it about and figure out what went wrong with me that made me unable to solve it .
Honestly, try for a little while, when you don't feel like solving it any more, read the editorial. There are more than enough CF tasks, that if you don't solve one by yourself it isn't much of a loss.
Usually I don't solve on codeforces. I use UVa the most.