Problem: D. Love Rescue time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Valya and Tolya are an ideal pair, but they quarrel sometimes. Recently, Valya …


939D

939C
Problem: C. Convenient For Everybody time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output In distant future on Earth day lasts for n hours and that’s why there …

916A
Problem: A. Jamie and Alarm Snooze time limit per test: 2 seconds memory limit per test: 256 megabytes input: standard input output: standard output Jamie loves sleeping. One day, he decides that he needs to …

913C
Problem: C. Party Lemonade time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output: standard output A New Year party is not a New Year party without lemonade! As …

913B
Problem: B. Christmas Spruce time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output: standard output Consider a rooted tree. A rooted tree has one special vertex called the …

913A
Problem: A. Modular Exponentiation time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output: standard output The following problem is wellknown: given integers n and m, calculate ,where 2n = 2·2·…·2 (n factors), and denotes the remainder …

908A
题： A. New Year and Counting Cards time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output: standard output Your friend has n cards. You know that each card has a …