博文

目前显示的是标签为“树状数组”的博文

【CF961E】Tufurama

图片
E. Tufurama time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output One day Polycarp decided to rewatch his absolute favourite episode of well-known TV series "Tufurama". He was pretty surprised when he got results only for season 7 episode 3 with his search query of "Watch Tufurama season 3 episode 7 online full hd free". This got Polycarp confused — what if he decides to rewatch the entire series someday and won't be able to find the right episodes to watch? Polycarp now wants to count the number of times he will be forced to search for an episode using some different method. TV series have  n  seasons (numbered  1  through  n ), the  i -th season has  a i  episodes (numbered  1  ...