Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link https://codeforces.com/10years. ×

Alex_KPR's blog

By Alex_KPR, 9 years ago, translation, In English,

Translated by Maria Belova

I continue the narration about the ACM-ICPC 2011 finals.

 

At last we got to the championship's opening :). A classic breakfast slowly but surely transferred into Bill Poucher's speech. Besides inviting his numerous colleagues to the microphone to say a couple of words, he made all the teams, volunteers and organizers stand up for greetings. In other words, he was having fun in every possible way.

Soon all the participants were gathered by the Plaza International Hall where the contest's trial rounds and the main round were held. Yes, remarkable as it is, there were as much as two trial tests! ;)

The first round started after the opening, the participants were offered 4 triplicated problems which equals 12 problems. =) We boosted our morals any way we could, the atmosphere was not exactly laid-back because nothing went okay, as usual. We narrowly managed to solve one problem by the end. By the way, that was us who had the Illegal Function verdict as we tried to calculate and write in the file. Later I overheard the Head Admin being very dissatisfied with the fact. :)

Read more »

 
 
 
 
  • Vote: I like it
  • +72
  • Vote: I do not like it

By Alex_KPR, 9 years ago, translation, In English,

Translated by Maria Belova

Hi everybody =)

 

So, the first day I'll start the narration from is the day of journey from Orel to Orlando. However lexicographically close the two cities might be, the distance between them is not small at all!

The journey began on the vice rector's car. There already is a funny story connected with that car: in exactly the same manner we set off for Budapest. Then, on our way to Domodedovo, the transport sensed that there were unusual people inside and just wouldn't go any further. As a result, our team, sleepy and scared, tried to hitchhike at 2 a.m. to get to the plane in time =). But that's a whole different story. This time, all went well, the car recognized us and didn't rebel against our presence.

Despite the rumors that due to an eruption flights are delayed because the airplanes fall right in the volcano in the centre of Europe, all went well. In four hours we arrived in London right on the schedule. And after six hours of fooling around we're on the plane again. This time it's already London-Miami. And yeah, at last, after 9 exhausting hours of flight accompanied by Vivaldi music, we're in Miami.

Read more »

 
 
 
 
  • Vote: I like it
  • +127
  • Vote: I do not like it

By Alex_KPR, 9 years ago, In English,
Доброе время суток! =)

Мною замечено, что с разборами задач испытывают трудности и авторы, и сами участники из-за не очень дружелюбного интерфейса.

У авторов возникают сложности сделать разбор сразу всех задач, поэтому очень часто можно видеть фразы вида: "разбор тут скоро появится, ждите". Делать каждый новый разбор на новой странице своего блога как минимум некрасиво, поскольку желающие найти конкретный разбор конкретной задачи будут испытывать серьёзное утомление от процесса поиска, а кроме всего прочего, такой подход захламляет прямой эфир и главную страницу (ведь разбор каждой задачи должен попасть на главную, верно?).

Read more »

 
 
 
 
  • Vote: I like it
  • +99
  • Vote: I do not like it

By Alex_KPR, 9 years ago, translation, In English,

Panoramix's Prediction (problem A, div-2). The problem's author is Alex_KPR

 

 

In the very beginning of statement you may find some words about what is prime number and what is next prime number. Main point of problem is to check is m next prime after n or not.

Problem statement guarantees that n is prime number. We need to check only two cases:

1. Number m is prime, and

2. There is no any prime number between n and m

Really, if there is prime number k between n and m then m cannot be next prime after n. Restrictions in this problem are really small and there is a way to solve it:

for(int i=n+1;i<=m;i++)
{
    if (prime(i))
    {
        if (i==m) return "YES"; else return "NO";
    }
}
return "NO";

where prime(i) is any correct way to check is number i is prime.

Another simple solution of this problem is to conside the fact that restrictions are no more than 50. It is possible to find all pairs n and m by hands and write solution formed by series of cases like this:

if (n==2 && m==3) return "YES";
else if (n==3 && m==5) return "YES";
else ...
else if (n==43 && m==47) return "YES";
else return "NO";

This solution gets "accepted" too.

 

 

Complexity may be various because of diffenent realizations and is in range from O(1) to O(n + m).

If you are interested in why your solution gets "wrong answer" the test "2 5" maybe helps you.

 

Read more »

 
 
 
 
  • Vote: I like it
  • +41
  • Vote: I do not like it

By Alex_KPR, 9 years ago, translation, In English,
Hi all!

Glad to see you on the Codeforces Beta Round #69. As you suspect, it's not an usual contest.

Every division has 5 problems. Some problems are in both divisions; other are meant for certain division. But from the participant's point of view there are no striking differences from other rounds.

Please notice that such an experiment is the first one, so some technical troubles and unexpected problems are possible. Please treat with understanding if it occurs.

Also: the costs of the problems in the first division are 500-1000-1500-2000-2000. In the second division the costs are classic: 500-1000-1500-2000-2500.

The round was prepared by Alex_KPRdagon and Marishka. Also RAD and it4.kp helped very much. The statements were translated by Maria Belova. The whole process was supervised by Mike Mirzayanov.

Good luck all!
_____________________________________

Don't forget about voting!
_____________________________________

Top 10 participants in the first division are:
Place
Who
1
 vepifanov
2
 KADR
3
 hos.lyric
4
 Zhukov_Dmitry
5
 e-maxx
6
 Romka
7
 ivan.popelyshev
8
 Shef
9
 RAVEman
10
 ktuan

Top 3 participants in the second division are:
Place
Who
1
 Gluk
2
 nvilcins
3
 piloop

Congratutations! Good luck for everybody at the next round! 
_____________________________________

Editorial is here.

Read more »

 
 
 
 
  • Vote: I like it
  • +177
  • Vote: I do not like it

By Alex_KPR, 9 years ago, translation, In English,
Problem A. A Student's Dream.

There was a lot of troubles because of incorrect statement. Now I hope statement is ok. Let's solve it. =)

If boy will goes to the left he will take her left hand with his right one and boy's left hand and girl's right hand will be unused. Situation is looks like the same if we swap them vice versa. So, we need to check two situations and choose the best one.

There is a simple way to check comfortableness, let's assume that boy has B fingers on active hand and girl has G fingers on active hand, so:

Read more »

 
 
 
 
  • Vote: I like it
  • +14
  • Vote: I do not like it

By Alex_KPR, 9 years ago, translation, In English,
Good evening!

Glad to see you at the 58-th beta round. Problems for today's contest are prepared by Orel STU and NNSU teams.

Good luck everyone!



Unfortunately, statement of problem A was incorrect in English. Russian statement was OK. I'm sorry for this mistake.



Results and ratings were updated.

Thanks for everybody who solve this contest!

Read more »

Announcement of Codeforces Beta Round #58
 
 
 
 
  • Vote: I like it
  • +38
  • Vote: I do not like it