C. Joty and Chocolate time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Little Joty has got a task to do. She has a line of n tiles indexed from 1 to n. She has to paint them in a strange pat…
D. Longest Subsequence time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given array a with n elements and the number m. Consider some subsequence of a and the value of least common…
D. Mahmoud and a Dictionary time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Mahmoud wants to write a new dictionary that contains n words and relations between them. There are two types of…
实验简单来讲就是 1. put 一个600M文件,分散3个replica x 9个block 共18个blocks到4个datanode 2. 我关掉了两个datanode,使得大部分的block只在一个datanode上存在,但因为9个很分散,所以文件能正确取回(靠的是checksum来计算文件值) 3. hadoop namenode很迅速的复制了仅有一个replica的block使之成为 3 replica(2) but only found 2 4. 我再关掉一个datanode,结果发…
Mad scientist Mike has constructed a rooted tree, which consists of n vertices. Each vertex is a reservoir which can be either empty or filled with water. The vertices of the tree are numbered from 1 to n with the root at vertex 1. For each vertex, t…
C. Cellular Network time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output You are given n points on the straight line - the positions (x-coordinates) of the cities and m points on the same line…
C. Hard problem time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasiliy is fond of solving different tasks. Today he found one he wasn't able to solve himself, so he asks you to help. Vasil…
A. Oath of the Night's Watch time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output "Night gathers, and now my watch begins. It shall not end until my death. I shall take no wife, hold no lands,…
C. Mahmoud and a Message time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mahmoud wrote a message s of length n. He wants to send it as a birthday present to his friend Moaz who likes strin…
简单题. #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> #include<vector> #include<queue> #include<map> #include<stack> using namespace std; long long n,a,b,p,q; long long gcd(long long a,…