A div2. Required row is row that have only one star inside. Requred column is comumn that also have only one star inside. So, you can iterate over all rows/columns, calculate number of stars inside them and find the answer.
Authors are MikeMirzayanov, Gerald
Hello everyone!
Today is the second round of the Open Moscow Programming Championship By CROC will be. Start is planned at 19:00.
Competition will happen by usual rules of Codeforces, with hacks and score falling in process of time. All contestants who passed score no less than contectant of the 300-th place in the Round 1, can participate in the Round 2. Every other contestants can patricipate the Round 2 out of competition. Specially for contestants of the second division we prepared more easy unofficial problemset. The official problemset and the unnoficial one have some common tasks.
Round will be rated for all participants.
Some number of problems are waiting you. They are roughly ordered by the increasing complexity. Score distribution is standard for both divisions (500-1000-1500-2000-2500). Don’t forget that during contest your solutions will be tested on a small set of pretests. Testing on full testset will be after end of the round. Pretests can don’t cover all cases of input data, so you should test your solutions very carefully.
It is strictly forbidden to publish statements/solutions of the problems before round will be end. Also you shouldn’t to talk about problems, discuss some things about possible solutions of them. Let’s be honest! You can discuss problems after the end of round.
Top 50 contestant will be allowed to the Final Round. Also all contestant with score not less than score of the 50-th contestant will be passed.
The round was prepared by Ripatti, havaliza, Gerald, RAD, MikeMirzayanov, Delinur.
Good luck for all!
UPD. We remind that the final of the Open Championship of Moscow and Moscow Region Programming (CROC) take place on April 27 in the office of the CROC. Note that CROC does not pay for the road and residence of the finalists. All participants must arrive at the final in the office of the CROC (Moscow) in the morning on April 27.
After the competition all participants will be provided to fill the form on the ability to participate in the finals of the competition. The first 50 participants on the results of the competition, which will confirm their participation in the finals, will be invited to final competition. You can confirm participation in the finals during the day after the end of Round 2.
It is recommended to fill the form, regardless of your results in Round 2, as large number of participants can reject the participation in the final.
A. Naive solution in O(n) (some simulation all of n rounds) gets TL. Let’s speed up this solution. Let’s consider rounds on segments [1..mk], [mk+1..2mk], [2mk+1..3mk] and so on. You can see that results of games on these segments will repeat. So you can simulate over exactly one segment and then take into consideration them [n/(mk)] times ([x] is rounding down). Remainder of n%(mk) last rounds you can simulate separately. So you have O(mk) solution that easily fits into time limits.
div2 A. In this problem you should find length of polyline, multiply it by k / 50 and output that you will recieve. Length of polyline is sum of lengths of its segments. You can calculate length of every segment using Pythagorean theorem:
.
Hello everyone!
I am glad to welcome you on today round of Codeforces. I hope that recent color revolution and a more later time for start of round will make some variety into process of solving problems:)
An author of today problems is me. RAD helped me to prepare this round, Delinur translated statements into English.
Good luck.
UPD.
The round ended, ratings was updated.
Winners of div1:
1. Egor
2. tourist
3. unicef
4. sevenkplus
Winners of div2:
1.
2. cjtoribio
3. miraliv
4. adrianoo
5. majia5
Yippee!
Editorial.Сайт Ала Циммерманна вот уже долгое время лежит. Постоянные участники соревнований этого сайта долго ждали когда он вернется к рабочему состоянию и так и не дождались. Поэтому они создали свой собственный сайт и запустили свой контест в стиле azspcs с блэкджеком и студентками. Победитель получит ааавтомобиииль! футболку с логотипом ISS. Подробности по ссылке.
A. (link) Solution of this problem is written in the fourth paragraph of the statements. You should carefully read and implement it. Only one difficult part is how to to determine which card has higher rank. You can for every card iterate over array [ '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A' ] and determine numbers of ranks in this array. Finally, just compare them.
Good evening.
Today's round is mine, as the previous one. This round will be for participants of the second division. Participants of the first division can take part in the round out of competition.
RAD, Connector, it4.kp and MikeMirzayanov helped me to prepare this round. Delinur translated statements into English.
Contest will be in the good old tradition of Codeforces. No any innovations, pretty short and clear statements.
Points for problems are standard: 500-1000-1500-2000-2500.
Good luck everyone!
UPD. Round was ended, ratings was updated.
Winners:
1. tsundere
2. jte
3. abacadaea
4. ltaravilse
Editorial.A. (link) In this problem you should do just that is written in the statement. At the first you should read all skills and multiply all levels of them by koefficient k. Next you should drop all skills which have level less than 100. After that you should add all new skills from the second list but only those thah are not present in the second list. At the end you should sort all skills by thier names and output them.
Hello everyone!
I am the author of problems of today round. RAD, Connector, it4.kp helped me to prepere this contest. Delinur thanslated statements into english.
It will be a thematic contest. And the theme is Disgaea.
Of course, if amount of your health points is ten-digit number.
fans about Disgaea
Disgaea: Hour of Darkness is tactical RPG video game for consoles Playstation 2, PSP и Nintendo DS. So, get acquainted:

Etna, Laharl and Flonne - main characters of the game
The problems involves some aspects of the game mechanics. They are adapted for problems, therefore a bit different from original ones. Please use statements as formal documents.
Some problems have animated pictures. Please ensure that your browser supperts formats APNG or GIF.
Problem points will be standard for contests of Codeforces:
500-1000-1500-2000-2500.
Good luck!
UPD. The contest ended and ratings was recalculated.
:Winners:
1. KADR
2. neal
3. cerealguy
4. ivan.popelyshev
5. tourist
Editorial.
A naive solution works in O(nmk). This solution stores all the start positions into an array and next iterates over all commands and shifts positions in needed directions. After every move it checks that all positions lie on the exit cell.
This solution doesn't fit into time limits.
An author's solution speed up the naive solution with using of bit masks.
A div2. In this problem you can simulate the process. You can consider all minutes and in dependence by a color of a current cablecar decrease size of corresponding group of students G by min(|G|, 2), where |G| is size of the group. After that you should determine the first minute t in that all three groups of students will be empty. So t + 30 is an answer. This solution works in O(r + g + b).
Hello everyone!
I am an author of problems of today round. This round is for both divisions. There will be 7 problems, the first 5 of them are for the second division and the last 5 are for the first one.
About points of problems. Today they are nonstandard:
for div2: 500-1000-1500-2000-2000
for div1: 500-1000-1000-1500-2500
Be careful.
RAD helped me for preparing the round. Delinur translated statements into English.
Good luck ans have fun.
UPD.
winners of the first division
1. peter50216
2. tourist
3. ACRush
winners of the second division
1. iamcs1983
2. zyx3d
3. seanwupi
Editorial.
UPD.
Unfortunately, in author's solution of priblem E some bug was found. We thanks participant LinesPrower for detection of it. Author's solution was updated and all solutions were rejudjed. Ratings will be recalculated for all participants excluding Egor and Jacob. We apologize for this incident.
A. You should count a number of vowels for every of three phrases. Next, you should compare this numbers with numbers 5, 7 and 5. If all is matched, answer is YES, otherwise answer is NO.
Author of problem is Ripatti.
I'm glad to welcome you on this Codeforces beta round.
Authors of today problemset are Ripatti (it is me) and Lepetrandr. it4.kp, MikeMirzayanov, RAD, Nerevar and dlevshunov helped in preparing the round. Delinur translated statements into English.
Good luck for all!
UPD
Winner is Neverauskas.
Editorial.
I am an author of the today problemset. It is my third contest on Codeforces and the first one for div 1.
I thanks Artem Rakhov, Maria Belova, Pavel Kuznetsov and Mike Mirzayanov for help in preparing of this round.
Happy hacking!
Winner is tourist.
Editorial.
Контест трехмесячный, однако на данный сайт я наткнулся всего несколько недель назад. Решил поучаствовать, дабы, так сказать, распробовать новый вид соревнований.
Introduction
After Codeforces Beta Round #11 several participants expressed a wish to read something about problems similar to problem D of that round. The author of this article, for the purpose of helping them, tried searching for such information, but to his surprise couldn't find anything on the Internet. It is not known whether the search was not thorough or there's really nothing out there, but (just in case) the author decided to write his own article on this topic.
In some sense this article may be regarded as a tutorial for the problem D from Beta Round #11.








