time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Ivan is playing a strange game. He has a matrix a with n rows and m columns. Each element of the matrix is equal to either 0 or 1. Rows and…
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Merge sort is a well-known sorting algorithm. The main function that sorts the elements of array a with indices from [l, r) can be implement…
time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given a string s consisting only of characters 0 and 1. A substring [l, r] of s is a string slsl + 1sl + 2... sr, and its length equa…
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Luba has to do n chores today. i-th chore takes ai units of time to complete. It is guaranteed that for every the conditionai ≥ ai - 1 is me…
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The annual college sports-ball tournament is approaching, which for trademark reasons we'll refer to as Third Month Insanity. There are a to…
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Your security guard friend recently got a new job at a new security company. The company requires him to patrol an area of the city encompas…
B. Lost Number[CF交互题 暴力] This is an interactive problem. Remember to flush your output while communicating with the testing program. You may use fflush(stdout) in C++, system.out.flush() in Java, stdout.flush() in Python or flush(output) in Pascal to…