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,…
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…
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. 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…
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…
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…
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…
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…
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,…
Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) 说一点东西: 昨天晚上$9:05$开始太不好了,我在学校学校$9:40$放学我呆到十点然后还要跑回家耽误时间....要不然$D$题就写完了 周末一些成绩好的同学单独在艺术楼上课然后晚上下第一节晚自习和他们在回廊里玩开灯之后再关上一片漆黑真好玩 A.Andryusha and Socks 日常煞笔提.....我竟然$WA$了一次忘了$n<<1$ #include <…