A. Grammar Lessons time limit per test 5 seconds memory limit per test 256 megabytes input standard input output standard output Petya got interested in grammar on his third year in school. He invented his own language called Petya's. Petya wanted to…
题目描述 This year Alex has finished school, and now he is a first-year student of Berland State University. For him it was a total surprise that even though he studies programming, he still has to attend physical education lessons. The end of the term i…
Physical Education Lessons CodeForces - 915E This year Alex has finished school, and now he is a first-year student of Berland State University. For him it was a total surprise that even though he studies programming, he still has to attend physical…
C. Dancing Lessons There are n people taking dancing lessons. Every person is characterized by his/her dancing skill ai. At the beginning of the lesson they line up from left to right. While there is at least one couple of a boy and a girl in the l…