D. Basketball Team time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output As a German University in Cairo (GUC) student and a basketball player, Herr Wafa was delighted once he heard the news. GU…
XKC , the captain of the basketball team , is directing a train of nn team members. He makes all members stand in a row , and numbers them 1 \cdots n1⋯n from left to right. The ability of the ii-th person is w_iwi , and if there is a guy whose abili…
XKC , the captain of the basketball team , is directing a train of nn team members. He makes all members stand in a row , and numbers them 1 \cdots n1⋯n from left to right. The ability of the ii-th person is w_iwi , and if there is a guy whose abili…
C. Array time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Chris the Rabbit has been interested in arrays ever since he was a child. At the moment he is researching arrays with the length of…
题目链接:http://codeforces.com/problemset/problem/1108/D time limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard output You have a garland consisting of n lamps. Each lamp is colored red, green or blue. The colo…
E. Team Work time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You have a team of N people. For a particular task, you can pick any non-empty subset of people. The cost of having x people fo…
Discription It's the turn of the year, so Bash wants to send presents to his friends. There are n cities in the Himalayan region and they are connected by m bidirectional roads. Bash is living in city s. Bash has exactly one friend in each of the oth…
Description Mad scientist Mike has just finished constructing a new device to search for extraterrestrial intelligence! He was in such a hurry to launch it for the first time that he plugged in the power wires without giving it a proper glance and st…
You may have already known that a standard ICPC team consists of exactly three members. The perfect team however has more restrictions. A student can have some specialization: coder or mathematician. She/he can have no specialization, but can't have…
I - Parking Lot Time Limit:500MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Description To quickly hire highly skilled specialists one of the new IT City companies made an unprecedented move. Every employee was granted a…