[tutorial:919A]↵
[tutorial:919B]↵
[tutorial:919C]↵
[tutorial:919D]↵
[tutorial:919E]↵
[tutorial:919F]↵
[Code](http://codeforces.me/contest/919/submission/34734803) (C++ version)↵
↵
[tutorial:919B]↵
↵
[Code](http://codeforces.me/contest/919/submission/34734836) (C++ version)↵
↵
[Code](http://codeforces.me/contest/919/submission/34734845) (Python version)↵
↵
[tutorial:919C]↵
↵
[Code](http://codeforces.me/contest/919/submission/34734870) (C++ version)↵
↵
[Code](http://codeforces.me/contest/919/submission/34734909) (Python version)↵
↵
[tutorial:919D]↵
↵
[Code](http://codeforces.me/contest/919/submission/34734932) (C++ version)↵
↵
[tutorial:919E]↵
↵
[Code](http://codeforces.me/contest/919/submission/34734971) (C++ version)↵
↵
[tutorial:919F]↵
↵
[Code](http://codeforces.me/contest/919/submission/34734992) (My stupid solution: C++ version)↵
↵
[Code](http://codeforces.me/contest/919/submission/34797525) ([user:demon1999,2018-02-01]'s fast solution: C++11 version)↵
↵
**UPD1:** Note that the editorial of problem E is modified with some correction. Sorry for that inconvenience.↵
↵
**UPD2:** The editorial is complete now. Hope you find it useful. :P
[tutorial:919C]↵
[tutorial:919D]↵
[tutorial:919E]↵
[tutorial:919F]
[Code](http://codeforces.me/contest/919/submission/34734803) (C++ version)↵
↵
[tutorial:919B]↵
↵
[Code](http://codeforces.me/contest/919/submission/34734836) (C++ version)↵
↵
[Code](http://codeforces.me/contest/919/submission/34734845) (Python version)↵
↵
[tutorial:919C]↵
↵
[Code](http://codeforces.me/contest/919/submission/34734870) (C++ version)↵
↵
[Code](http://codeforces.me/contest/919/submission/34734909) (Python version)↵
↵
[tutorial:919D]↵
↵
[Code](http://codeforces.me/contest/919/submission/34734932) (C++ version)↵
↵
[tutorial:919E]↵
↵
[Code](http://codeforces.me/contest/919/submission/34734971) (C++ version)↵
↵
[tutorial:919F]↵
↵
[Code](http://codeforces.me/contest/919/submission/34734992) (My stupid solution: C++ version)↵
↵
[Code](http://codeforces.me/contest/919/submission/34797525) ([user:demon1999,2018-02-01]'s fast solution: C++11 version)↵
↵
**UPD1:** Note that the editorial of problem E is modified with some correction. Sorry for that inconvenience.↵
↵
**UPD2:** The editorial is complete now. Hope you find it useful. :P