Автор BYN, 12 лет назад, По-английски

You enjoyed Bayan Programming Contest 2012-2013? Now we are happy to unveil Bayan Programming Contest 2014-2015! This will be Bayan's 3rd public programming contest and we have made several improvements and did our best to make the whole tournament even more fun! To register visit contest.bayan.ir right now!

Introducing the rounds

Bayan Programming Contest We are going to host 5 rounds:

  1. The first round is named Shortcut!. Shortcut! round is mainly meant to help us actively test our new contest platform, but since we'd like to thank all the people participating in this round, the winner will bypass "all" intermediate rounds, and directly advance to the final onsite event! Top 5 contestants will also get a T-shirt. Shortcut! round is not going to be too hard and there is only 1 hour to solve 3 problems, making it harder to predict the round winner!

  2. Warm-up is our second round and honoured to be hosted on Codeforces. Warm up is also not a required round but it is going to be rated for both divisions and the top 50 are going to win t-shirts.

  3. Bayan Programming Contest officially begins with the Qualification round. It is going to be an easy event, and solving one problem is enough to advance to Elimination round. If you missed Shortcut! Round, make sure to get familiar with our new platform during this round. Also, 5 random participants will be receiving t-shirts.

  4. Elimination round is the most challenging online round in this tournament. Top 100 participants will be receiving t-shirts, but only top 20 from 20 countries will get the chance to compete in the final (onsite) event.

  5. Final round will be an onsite event. To find the onsite event's look and feel, you can watch this 4 minute video clip. More details will be announced later.

UPDATE:

Shortcut! Round Terms & Rules

  • Shortcut! round will start at 13:00 UTC, 29 August 2014.
  • Shortcut! round consists of three programming tasks and competitors will have just one hour to solve them.

Solving Problems

  • Competitors may solve problems by any means and are free to use any programming language, library or computational application to solve problems. Given an input file, you should submit a correct output together with the source code used to produce that output within the specified time limit.
  • Not submitting any file during the time limit, will be considered as an unsuccessful attempt.
  • Both input and output formats are crucial. Adhere them precisely to avoid getting solutions judged as wrong.

Penalties

  • Competitors may not use more than one user account.
  • Competitors may not communicate with each other during the contest.
  • Your output must be reproducible using the source code you provided.
  • All submitted source codes will automatically get analyzed for code plagiarism detection.
  • Cheaters will be banned forever from Bayan programming contests.

Judging

  • Do not submit irrelevant clarifications during the contest.
  • The decision of the judges are final in all matters.
  • All source codes of the competitors will be published after each round.
  • Bayan's staffs are not allowed to participate in the contest.

Score Calculation Method

Score for each solved problem is calculated based on these values:

  • n = No. of accepted submissions
  • t = Contestant's submission time
  • T = Total contest duration
  • p = Number of contestant's wrong attempts

  • Проголосовать: нравится
  • +331
  • Проголосовать: не нравится

»
12 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

hooray bayan again!!!

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +33 Проголосовать: не нравится

"but only top 20 from 20 countries will get the chance to compete in the final (onsite) event." — so from pigeonhole principle, only one person per country is allowed? Though I think that makes my chances larger (even though Poland is pretty strong country), because there is only one place for Russians and one for Chinese, I highly dislike "local rules" like "only one team per university" like on ACM or something similar :(. Why simply not twenty best people?

  • »
    »
    12 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +46 Проголосовать: не нравится

    Probably to make the competition more diverse contry-wise. Precisely because if it was 20 best, then a lot of people would probably be Russian (if the Elimination round is on CF). All the more when the number of competitors is smaller. It has some good points, like that timezones and contest site demographics matter less, and some bad points, like that country luck matters and there are new ways of cheating to take care of (oh look, the winner is from Saint Kitts and Nevis).

    Oh well, what matters is solving problems.

    Just to make it clear (which it wasn't to me at first), apparently the algorithm is

    • from each country, pick the best competitor

    • from their scoreboard, pick 20 best

»
12 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +22 Проголосовать: не нравится

Is one person allowed to win few t-shirts — in case he is ranked high enough in few different rounds?

top 20 from 20 countries — this means that only 1 participant from a country is allowed to take part in finals? What countries is person allowed to represent? I mean, one can easily pick some not so good in programming country instead if his native Russia/China/Japan/Poland/Ukraine/Belarus... just to increase his chances:) Am i allowed to represent country where i am currently studying/working/traveling instead of my native one? Where can I read some clear explanation of this part of rules?

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

I'm missing one piece of info in this announcement or the official site: the contest rules of each round. (e.g. CF rules for CF-organized rounds, ICPC or custom rules)

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +128 Проголосовать: не нравится

"... but only top 20 from 20 countries will get the chance to compete in the final (onsite) event"

It's time to change nationality to Norway in my profile!

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

They might ask for some proof of nationality eg. Nation which issued your passport to determine you are from that nation and is not faked nation name in profile.

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

video clip is nearly 8 minutes. not 4

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why does the video clip page say: This video is unavailable with Safety Mode enabled. To view this video, you will need to disable Safety Mode.

I think most people's default youtube safety option is "on".

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

"Also, 5 random participants will be receiving t-shirts" Well...I think expectation of receiving t-shirt in this way is more than the other ways(of course for me)!

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I ❤ ❤ ❤ ❤ IRAN

»
12 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится -9 Проголосовать: не нравится

IGNORED

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Hey, sorry if it's in the rules and I've missed it, but are there any age requirements about the finals? I'm underage so I'm wondering if I even have a theoretical chance of qualifying :)

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +28 Проголосовать: не нравится

Does it mean only one Iranian Competitor can advance to the final round? because the last contest has different rules for Iranian participants.

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Will all rounds start at 13:00 (UTC)? It will be 06:00 am here. :(

Anyway, it is extremely hard for me to advance.

»
12 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +29 Проголосовать: не нравится

are the rules of the contests like ACM ? or something else?

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

How I can see, which users was registered at Shortcut! ?

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Update: Shortcut! round terms & rules has been added to this post.

Please make sure to read it carefully.

  • »
    »
    12 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    I suppose there's instant feedback, then.

    Will there be a public scoreboard?

    Also, there's an interesting implication of the scoring rule: if 362+ people () solve a problem, the score for it depends on time only and the optimal strategy is submitting as many times as possible without regard for WAs. That is, there's no point in caring about WAs for easy problems, which could lead to MANY submissions.

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Registered contestants will have access to the contest area from one hour before the start.

»
12 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +23 Проголосовать: не нравится

May one see the verdict of judge for his submission right after submission?

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +20 Проголосовать: не нравится

C'mon! Safari 7.0.6 is considered an old browser?

»
12 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится -6 Проголосовать: не нравится

Contest delayed by 30 minutes.

UPD: Sorry , mistake on my part. If BYN can be forgotten for such a platform, why not me :/

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +39 Проголосовать: не нравится

502 Error

»
12 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +24 Проголосовать: не нравится

Unsuccessful start of the contest :(

edit: Unsuccessful contest :(

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +62 Проголосовать: не нравится

To the organizers: problem names were visible before the contest start on the 'clarifications' tab so please make sure that those names at least do not give any hints in advance.

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Хорошее начало

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +35 Проголосовать: не нравится

First making me update my browser which works perfectly fine for all other contests (almost causing me to miss the starting time, since I didn't get any "browser outdated" message on the rest of the website, just the contest area), then 502 when the contest starts.

Bad first impression.

»
12 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

Понятно

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Unable to load the website. It's giving 502

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Input and output section contain the same information!

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +42 Проголосовать: не нравится

best contest ever...

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

bayan just went down while i was submitting :(

»
12 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится +25 Проголосовать: не нравится

Horribly slow and buggy website, makes me click thousand times to get what I want, loads slow as hell and gives errors 50% of the refreshes.

Having time penalty on such a horribly slow and crashing platform is just not fair.

EDIT: Currently watching my time expire for the given input, because the lovely submit button won't work...

»
12 лет назад, скрыть # |
← Rev. 4  
Проголосовать: нравится +14 Проголосовать: не нравится

I can't download the input because "service unavailable". What the serious fuck?

I'm not going to waste more time on this.

»
12 лет назад, скрыть # |
← Rev. 16  
Проголосовать: нравится +40 Проголосовать: не нравится

**until the server back here is the first problem

You are going to add a feature to an online registration form, so that the users be able to see the security level of their chosen passwords. A password is a string of Latin English letters, digits and characters . To determine the security level of a password, you should determine how many of the following conditions are satisfied:

  • The password contains at least one digit.
  • The password contains at least one Latin character.
  • The password contains at least one non-digit-non-Latin character.
  • The password contains at least 6 characters.
  • The password contains more than 10 characters.
  • The password contains at least one small and at least one capital Latin character.
  • All characters of the password are different. (Small and capital form of the same Latin character are considered different)

A password is considered weak, if less than four of the above conditions are met. A password is strong, if at least six of the above conditions are met. Otherwise, it is considered a normal password.

Write a program to determine the security level of some given passwords.

Input

The first line contains an integer T, number of test cases. Each test case is preceded by an empty line. The only line of each test case contains the password.

Output

The first line contains an integer T, number of test cases. Each test case is preceded by an empty line. The only line of each test case contains the password.

  • 1 ≤ T ≤ 100
  • The password only contains characters a to z, A to Z, 0 to 9 and !@#$%^&*().
  • The length of the password is between 1 and 15, inclusive.

Sample Input

4

qwerty

%normal%pass%

!hElLo123!

!hElLo123*

Sample Output

Case #1:
weak
Case #2:
normal
Case #3:
normal
Case #4:
strong
  • »
    »
    12 лет назад, скрыть # ^ |
    ← Rev. 4  
    Проголосовать: нравится +24 Проголосовать: не нравится

    I'll post B and C then.

    Problem B

    A country has a + b cities located in a row, which are uniformely placed. There are two large telecommunication operators in this country. The first operator will install BTSs in a cities and the other operator would install BTSs on the remaining b cities. A base transceiver station (BTS) is a piece of equipment that facilitates wireless communication between user equipment (UE) and a network. Communication between two cities supported by the same operator has no cost. Otherwise the cost of communication between those two cities would be equal to their distance. Distance of two cities is equal to the number of cities strictly between them. The operators have decided to install their BTSs, trying to minimize the total cost. The total cost is defined as the sum of communication costs for every pair of cities. In other words, for each pair of cities with different operators, they calculate the number of cities located between them and they intend to minimize sum of these values. Moreover, the operators want to calculate the number of ways they can install their BTSs, while minimizing the total cost. Two ways of installation are considered different if there exists a city which has different operators in those two. The number of ways to install BTSs can be very large, it is enough to calculate it modulo 10^9 + 7.

    Input

    The first line contains an integer T, number of test cases. Each test case is preceded by an empty line. The only line of each test case contains two integers a and b, denoting the number of BTSs of each operator.

    Output

    For each test case, first output a line containing Case #x:, where x is the test case number, starting from 1. On the next line, output two space separated integers, the minimum total cost and the number of ways to achieve it.

    Constraints

    1 ≤ T ≤ 100
    0 ≤ a, b ≤ 106
    1 ≤ a + b

    Problem C

    A frog lives in a square shaped lake with size 10^9 × 10^9. Consider the lake as a large grid of unit square cells. There are some water lilies on the lake. Each water lily covers a rectangular part of the lake. Water lilies might overlap. The frog is at (xs, ys) in the beginning. We know that the initial position of the frog is on at least one water lily. In each step the frog can jump from (x, y) to (x + p, y + p), (x + p, y − p), (x − p, y + p) or (x − p, y − p)‌ as long as his destination is covered by at least one water lily. There is no limit on the number of times the frog can jump. How many cells can it reach?

    Input

    The first line contains an integer T, number of test cases. Each test case is preceded by an empty line. Each test case starts with a line containing n, p, xs, ys, the number of water lilies, size of frog's jump, and initial position of the frog. The following n lines each contains four integers x1, y1, x2, y2, denoting opposite corners of a rectangular water lily.

    Output

    For each test case, first output a line containing Case #x:, where x is the test case number, starting from 1. On the next line, output one integer, the number of reachable cells.

    Constraints

    1 ≤ T ≤ 100
    1 ≤ n ≤ 500
    0 ≤ p, xs, ys < 10^9
    0 ≤ x1 ≤ x2 < 10^9
    0 ≤ y1 ≤ y2 < 10^9

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

Very hard contest indeed, Nobody solved anything :D

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +187 Проголосовать: не нравится

Okay, I've now seen all three problems — 500, 502 and 504...

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

The feeling when you code a task for 5 mins exactly, but to read and submit it you need 15 more. Okay

»
12 лет назад, скрыть # |
 
Проголосовать: нравится -6 Проголосовать: не нравится

The moment when you look at problem Bs output explanation, and check the sample test, and you have no idea what the fuck do they want from you...

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +37 Проголосовать: не нравится

task B:

Input

The first line contains an integer T, number of test cases. Each test case is preceded by an empty line. The only line of each test case contains two integers a and b, denoting the number of BTSs of each operator.

Output

The first line contains an integer T, number of test cases. Each test case is preceded by an empty line. The only line of each test case contains two integers a and b, denoting the number of BTSs of each operator.

Very good!

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +111 Проголосовать: не нравится

Maybe you'll use CF platform for next edition of Bayan instead of trying to invent your own?..

»
12 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится -8 Проголосовать: не нравится

Ignore, the same idea posted before

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How do you read the .in file?

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Исправленный семпл(через минут 25 после начала) в А Case #1: weak

который вначале выглядел как Case#1: weak

Причем отличить вначале, что там пробел, можно было только скопировав строчку с кейсом и вставив ее у себя

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Such enjoyable contest :\

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +45 Проголосовать: не нравится

Did they give us an extra 40 minutes because of their incompetence, or is the timer bugged like everything else?

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +22 Проголосовать: не нравится

The contest length increased??? 45 minutes remaining???

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Я так понимаю что кроме первой страницы Scoreboard, остальные не показываются. Остальные не люди что-ли?

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +34 Проголосовать: не нравится

I hope these mess won't happen in the Warm up round (the one hosted on Codeforces). I don't like unrated rounds.

»
12 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

It looks like I can't sign out. Contest site is more "unsecure" than browsers it bans.

»
12 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +16 Проголосовать: не нравится

"Shortcut! round is not going to be too hard and there is only 1 hour to solve 3 problems, making it harder to predict the round winner!". Seriously ??

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

And this persisted throughout.

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится

In Problem B, I found that in case a<=b, the number of ways is 1 if (a-b) is odd, otherwise it is 2^a. But I can't find any fomular about the minimum cost. Has anybody found it?

»
12 лет назад, скрыть # |
 
Проголосовать: нравится -27 Проголосовать: не нравится

I really think that if in problem B the second number is in modulo a number, why shouldn't the first number also... WA X 3 because of this

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

What's happening with C problem?I see people which 3 seconds ago didn't have it solved and now they got AC..

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

At the first of the contest, Persian statements had syntax problem! There wasn't a space between the word Case and #. I received 2 wrong answers because of it! I got rank 203 instead of below 50 :(

A question: In the middle of the contest my rank suddenly became good (around 15) and then it changed to 199. What was this problem?

»
12 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Contest is over and system is down. Can somebody provide his/her testdata (input and output) for checking the solution for problem B?

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I guess, the statement of problem A was not completely clear.

"All characters of the password are different. (Small and capital form of the same Latin character are considered different)"

First I reformulated this as "Each character appears only once in the password" and considered that one-symbol password satisfies this condition, which was wrong.

  • »
    »
    12 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +4 Проголосовать: не нравится

    I got AC assuming that one-symbol password satisfies this condition.

  • »
    »
    12 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Tbh, I don't see anything not clear in this. All the characters are different is equivalent to There is no character c such that the password containts 2 appearances of c

  • »
    »
    12 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +1 Проголосовать: не нравится

    Why would it be wrong? I assumed that and got AC, maybe you made a mistake somewhere.

    • »
      »
      »
      12 лет назад, скрыть # ^ |
      ← Rev. 2  
      Проголосовать: нравится 0 Проголосовать: не нравится

      Hm, very weird, I got AC only after I've added the check for length in check() (if l > 1: ...).

      And even more weird is that one-symbol password should always be weak, this fix doesn't make any sense...

      Maybe it was some bug in checking system.

      import re
      
      n = int(raw_input())
      ts = [raw_input().strip() + raw_input() for i in xrange(n)]
      
      
      def check(p):
          r = 0
          l = len(p)
          if re.match('.*\d.*', p):
              r += 1
          if re.match('.*[a-zA-Z].*', p):
              r += 1
          if re.match(r'.*[\!@#\$%\^&\*\(\)].*', p):
              r += 1
          if l > 5:
              r += 1
          if l > 10:
              r += 1
          if re.match('.*[a-z].*', p) and re.match('.*[A-Z].*', p):
              r += 1
          for i in xrange(l):
              if p[i] in p[:i]:
                  return r
          if l > 1:
              r += 1
          return r
      
      for i in xrange(n):
          print 'Case #%s:' % (i + 1)
          t = ts[i]
          c = check(t)
          if c < 4:
              print 'weak'
          elif c >= 6:
              print 'strong'
          else:
              print 'normal'
      
»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I couldn't open the website with chromium or firefox on Ubuntu 12.04 LTS. This is a really big problem! It should be solved by Bayan.

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

У меня одного не открывается страница с контеста(условия, положение)?

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

It was so hard to submit output and source code! First time I got WA 'cause I couldn't click 2^64 times on submit button. Second time I managed to be fast enough :]

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +23 Проголосовать: не нравится

Where are the final standings??

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

where is the website link of the short cut competitions,i can not see information on the official website,can someone put that,thanks very much.