Alex_KPR's blog

By Alex_KPR, 13 years ago, translation, In English

It will be fully translated later, sorry for slowpoking :(


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

 

 

Obviously, suits are not change the answer. Look at all possible situations:

[0 - 10] — zero ways.
[11] — four ways using aces.
[12 - 19] — four ways using cards from 2 to 9.
[20] — 15 ways, they are described in statement.
[21] — four ways using aces.
[22 - 25] — zero ways.

 

 

Complexity is O(1).

 

Full text and comments »

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

By Alex_KPR, 13 years ago, translation, In English

Hi all!

Now it's time for 80th Codeforces Beta Round.

The authors of the contest are: Alex_KPRwingerRADConnectorit4.kp. I hope all problems will be interesting for you and not extremely hard. ;)

Today is Connector's birthday — so, let's congratulate him together!

Good luck and have fun!
_____________________________________

Thank you for your action! =)

Top 10 participants in the first division are:

Place
Who
1
 SergeiRogulenko
2
 hos.lyric
3
 Romka
4
 neal
5
 sdya
6
 KADR
7
 ftiasch
8
 niyaznigmatul
9
 dolphinigle
10
 AleX

There are only two participants who beat problem E: the winner of the contest SergeiRogulenko and MBabin who gets 76th place.

Top 3 participants in the second division are:

Place
Who
1
 anrieff
2
 zplinti1
3
 Efgen

Congratulations and good luck at the next time!

Official tutorial will be added later. But AlexanderBolshakov already wrote the tutorial about most of problems.

Problems were translated by Delinur.
_____________________________________

Tutorial is here.

Full text and comments »

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

By Alex_KPR, 13 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.

 

Full text and comments »

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

By Alex_KPR, 13 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.

Full text and comments »

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

By Alex_KPR, 13 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:

Full text and comments »

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

By Alex_KPR, 13 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!

Full text and comments »

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

By Alex_KPR, 14 years ago, translation, In English

Hi, everybody, and welcome to the Codeforces Beta Round #9!

I'm its author. :) I've tried to make problems easy to read and funny. I’d like to say thank you to Mike Mirzayanov (for choosing problems for the contest and everything he’s done to organize it), to Igor Kudryashov (for checking author's solutions and making test generators), to Dima Matov (for correcting everything :)) and, of course to Julia Satushina (for excellent translations of the problems’ legends).

I'd like to remind you that if you have any questions on the problems, the best way to ask them is to use the web interface on the problems page.

I believe that the contest will be interesting to you, dear participants! I’m looking forward to seeing your suggestions here.

Good luck!

Full text and comments »

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