Simon and Antisimon play a game. Initially each player receives one fixed positive inte...
Simon and Antisimon play a game. Initially each player receives one fixed positive inte...
Manao works on a sports TV. He's spent much time watching the football games of some co...
The GeoSurvComp geologic survey company is responsible for detecting underground oil de...
Mad scientist Mike entertains himself by arranging rows of dominoes. He doesn't need do...
Shapur was an extremely gifted student. He was great at everything including Combinator...
An elephant decided to visit his friend. It turned out that the elephant's house is loc...
要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。Input数据的第一行是一个T,表示有...
国庆期间,省城HZ刚刚举行了一场盛大的集体婚礼,为了使婚礼进行的丰富一些,司仪临时想出了有一个有意思的节目,叫做"考新郎",具体的操作是这样的:首先,给每位新娘打扮得几乎一模...
Being a nonconformist, Volodya is displeased with the current state of things, particul...
Vasya has n pairs of socks. In the morning of each day Vasya has to put on a pair of so...
世界杯结束了,意大利人连本带利的收回了法国人6年前欠他们的债,捧起了大力神杯,成就了4星意大利.世界杯虽然结束了,但是这界世界杯给我们还是留下许多值得回忆的东西.比如我们听到...
ZS the Coder and Chris the Baboon are travelling to Udayland! To get there, they have t...
The Saratov State University Olympiad Programmers Training Center (SSU OPTC) has n stud...
Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatiu...
An n × n table a is defined as follows:The first row and the first column contain ones,...
Manao is trying to open a rather challenging lock. The lock has n buttons on it and to ...
Fox Ciel starts to learn programming. The first task is drawing a fox! However, that tu...
One way to create a task is to learn from math. You can generate some random math state...
After winning gold and silver in IOI 2014, Akshat and Malvika want to have some fun. No...
Vasya works as a DJ in the best Berland nightclub, and he often uses dubstep music in h...