The book I recommend to people getting started is Competitive Programming 3 [1] by Steven and Felix Halim. It's pretty great if you have already a basic grasp of simple algorithms and a bit of C++.
And as you say you need to practice, and the book incentivizes it.
They accompany the book with precisely problems from UVa Online Judge, some of them solved and with code (in the book and in the site).
I bought the A5 version and the printing quality was extremely low, they shouldn't sell something this bad. I would get another format if I had to buy it again.
https://uva.onlinejudge.org/index.php?option=com_onlinejudge...
Learning algorithms per se is only a small part of training. Much bigger part of training is learning how to recognize these algorithms in problems.
After reading about some algorithm, I always solve a couple of related problems.
P.S. Looks well-written. Bookmarked. I appreciate the effort of the author to create this book.