D. Dima and Bacteria time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Dima took up the biology of bacteria, as a result of his experiments, he invented k types of bacteria. Overall, there a…
http://codeforces.com/contest/707/problem/D 先说一下离线和在线:在线的意思就是每一个询问单独处理复杂度O(多少多少),离线是指将所有的可能的询问先一次都处理出来,最后对于每个询问O(1)回答. 然后说一下cf的这题: D. Persistent Bookcase time limit per test 2 seconds memory limit per test 512 megabytes input standard input output st…
D. Long Path time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output One day, little Vasya found himself in a maze consisting of (n + 1) rooms, numbered from 1 to (n + 1). Initially, Vasya is at th…
D. Upgrading Array time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have an array of positive integers a[1], a[2], ..., a[n] and a set of bad prime numbers b1, b2, ..., bm. The prime num…
D. Minesweeper 1D time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output Game "Minesweeper 1D" is played on a line of squares, the line's height is 1 square, the line's width is n squares. S…
D. Toy Sum time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Little Chris is very keen on his toy blocks. His teacher, however, wants Chris to solve more problems, so he decided to play a tri…
C. Unusual Product time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Little Chris is a huge fan of linear algebra. This time he has been given a homework about the unusual square of a square…
D. Roman and Numbers time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output Roman is a young mathematician, very famous in Uzhland. Unfortunately, Sereja doesn't think so. To make Sereja change h…
E. Inna and Binary Logic time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Inna is fed up with jokes about female logic. So she started using binary logic instead. Inna has an array of n ele…