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
We are going to host 5 rounds:
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!
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.
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.
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.
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
- n = No. of accepted submissions
- t = Contestant's submission time
- T = Total contest duration
- p = Number of contestant's wrong attempts
hooray bayan again!!!
.
Iranian style contest
"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?
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
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?
"Is one person allowed to win few t-shirts — in case he is ranked high enough in few different rounds?"
No.
"Am i allowed to represent country where i am currently studying/working/traveling instead of my native one?"
The country that issued your passport is our criterion.
What if multiple countries satisfy this requirement?
Good for him!
May you explain the algorithm of choosing participants of final event? only one competitor from each country is gonna be chosen?!
Exactly.
Is it right only for Elimination round? And the only one country can be represented by two participants (if one of them is the winner of the Shortcut round)?
Yes. The winner of shortcut! may meet a fellow citizen at the final.
hi,can you tell me the link of shortcut ,thanks very much.
How will you find out where his/her passport is issued?
In my case, it's written on thecover and along with all the personal information. I suppose it's the same in most countries, you only need to look.
:| I mean how will Bayan team find this out.
They also only need to look :D
When? When they get to Iran?!
The same as last year, finalists should email us their passport copy, in order to receive the invitation letter. Besides, like last year again, we pay the flight costs when the finalists arrive. So no one should worry. Cheaters — if any — will be left alone at the airport!
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)
"... 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!
You won't be able to qualify even from Antigua and Barbuda boy!
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.
Not good enough, since someone can have multiple passports and pick the most convenient one.
https://www.henleyglobal.com/citizenship-cyprus-citizenship/
Cyprus citizenship — 2500000 euro
Chance to compete in the final — priceless
video clip is nearly 8 minutes. not 4
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".
I love bayan contest.:D
I didn't know that cheaters love bayan contest too :)
please stop:(
:) cheaters have a low rate in contribution!
for cheaters yeah but for other not
I don't cheating. ok ok I'm a cheater ok :( :(
"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)!
I ❤ ❤ ❤ ❤ IRAN
IGNORED
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 :)
As mentioned on the FAQ, there is no age, gender or religion restrictions.
Well, most underage people must be accompanied by an adult abroad, so will accomodation (and travel expenses for top10) be provided for the adult?
Bayan will pay the accommodation cost in that case.
Does it mean only one Iranian Competitor can advance to the final round? because the last contest has different rules for Iranian participants.
here, they said 40 competitor from Iran can advance to final round.
deleted!
Will all rounds start at 13:00 (UTC)? It will be 06:00 am here. :(
Anyway, it is extremely hard for me to advance.
6 AM isn't so bad if you go to sleep early, it's a pretty decent morning. (I had a period of sleeping in the afternoon/evening once, so I know.) 4-5 AM is worse.
Yes, I know 4-5 AM is worse, the last online round of Facebook Harcker Cup is on 5AM if you are in China.
Let me try to get up earlier, I just oversleept last codeforces round. XD
It's easier to stay awake till 6am, than to wake-up at 6am.
Maybe easier.. But bad for a contest
But is it easier to do well in a contest after staying awake till 6 AM or after waking up at 5:30?
are the rules of the contests like ACM ? or something else?
How I can see, which users was registered at Shortcut! ?
Update: Shortcut! round terms & rules has been added to this post.
Please make sure to read it carefully.
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.
Thanks for sharing this trick :D
"... which could lead to MANY submissions." So you get the chance to better test your new platform under load. :)
Yes. The first problem is going to be very easy.
Registered contestants will have access to the contest area from one hour before the start.
I keep on getting a 500 error "500 Oops!
Something's not right."
Getting the same thing.
we will be out of maintenance mode very soon./ we are back.
When :(
May one see the verdict of judge for his submission right after submission?
C'mon! Safari 7.0.6 is considered an old browser?
The same error for Yandex Browser 14.7
Kinda stupid restrictions for the browsers. Opera 23 is not supported too. Bad for you.
Contest delayed by 30 minutes.
UPD: Sorry , mistake on my part. If BYN can be forgotten for such a platform, why not me :/
No, accessing the arena delayed by 30 mins.
UPD: It's now available.
No. Contest will start in its time.
Sorry, earlier I thought it was to start at 6:00 pm (IST).
Thanks.
Is it just me.. or are the problems not there?
Problems? The arena is not there for me. Just 500 for half an hour now.
I managed to load the arena a bit earlier, but now it is giving the same error as you stated.
however contestants won't be able to start at all
502 Error
Ditto.
Mine is "504 Gateway Time-out".
502 error :(
Now I'm getting 504 as well
Same! Can't get contest :(
flake get on WOOT
GOOD getting problems to load >:D
You, at least, got them. I still can't see any of them
Unsuccessful start of the contest :(
edit: Unsuccessful contest :(
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.
Хорошее начало
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.
At me it still doesn't work.Does anybody know how to solve the 502 error?
It's not a part of the contest, you can't solve it.
Very hard, I opened the arena.Now, where can I find the problems?
It was the easy part, brace yourself. Problem list should be in the left menu, sometimes it doesn't load though. I'm trying to submit — that seems to be a hard part of this contest.
Понятно
Unable to load the website. It's giving 502
i got the problem now.. its working. How do i get the input file though?
Input and output section contain the same information!
best contest ever...
bayan just went down while i was submitting :(
You are lucky.I can't see the problems
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...
I can't download the input because "service unavailable". What the serious fuck?
I'm not going to waste more time on this.
You've done well! :D It doesn't worth enough!
Opinions correlate with rating here. I confused "Latin characters" and "characters" in A and wasted a lot of time fixing a recursive implementation of B (stack limits in Cygwin and getting rid of 1 fork). A lot of time and WAs wasted.
**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:
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.
a
toz
,A
toZ
,0
to9
and!@#$%^&*()
.Sample Input
Sample Output
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
Very hard contest indeed, Nobody solved anything :D
Okay, I've now seen all three problems — 500, 502 and 504...
The feeling when you code a task for 5 mins exactly, but to read and submit it you need 15 more. Okay
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...
http://prntscr.com/4hmvmp Lol what?
Yea... I though you're supposed to calculate the number of ways to do something... but printing the input is fine too, I guess :D
EDIT: Quite impressed that someone actually solved it correctly, I got no idea whats the output..
Well I think they want the minimum distance and the number of ways how to obtain it, but lets listen to the statement? :D
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!
the problem is very easy, Just output the input
You can do this for the 3rd problem as well >:D. I'm excited for this easy contest... if just i was able to submit :.
Why do you can't submit?
You need to press the button 1000000007 times in 8 minutes to submit succesfully, that requires some skills
Maybe you'll use CF platform for next edition of Bayan instead of trying to invent your own?..
Ignore, the same idea posted before
How do you read the .in file?
Like you would do every other one
You need to remove the
.htm
extension before opening it.Oh yea, I forgot to bitch about that. A note for organizers of this contest: a
.in
file is NOT, I repeat is NOT, a.in.htm
file! Because that's what it's downloaded as (and it doesn't happen to me elsewhere, so it's not about my system).Tbh i just copied it into my notepad.
then how to make .out?
You dont have to. submit your .txt file
how to copy the output from cmd to np++?
It's easier to make your program read/write from files, I personally use freopen but there are many other functions that do the job.
Or you could just use the <test.in >test.out commands by running your .exe from cmd.
Исправленный семпл(через минут 25 после начала) в А Case #1: weak
который вначале выглядел как Case#1: weak
Причем отличить вначале, что там пробел, можно было только скопировав строчку с кейсом и вставив ее у себя
Да! Мне тоже показалось так было, я 4 раза подряд собрал ВА, прежде чем страница обновилась, и появился пробел.
Я 3 раза собрал ВА, потом минут 10 сканил свой код, пока страница обновилась
А я сразу заметил :р
Such enjoyable contest :\
Did they give us an extra 40 minutes because of their incompetence, or is the timer bugged like everything else?
The contest length increased??? 45 minutes remaining???
Я так понимаю что кроме первой страницы Scoreboard, остальные не показываются. Остальные не люди что-ли?
I hope these mess won't happen in the Warm up round (the one hosted on Codeforces). I don't like unrated rounds.
Haha don't worry, it won't happen like this when the round is on CF. Not saying there can't be smaller fails, but most definitely not of this scale.
After seeing this, I am very very excited for the codeforces contest tomorrow... even though it is at 3:30 AM.
It looks like I can't sign out. Contest site is more "unsecure" than browsers it bans.
"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 ??
Tourist didn't win, so yes, is hard to predict the winner.The strange thing is that the tasks weren't so easy...
I lost bet on the winner! :(
It was so strange...
Maybe it was a bug causing 5-stars problems to appear instead of 2-stars problems
And this persisted throughout.
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?
You don't need a formula.You need just to see when is the minimum cost(you can construct the arrangement) and then you compute the cost in O(A+B)
really??? how can you arrange it? A greedy solution?
Yes.You alternate somewhere at the middle 0 and 1.Something like this:
00 0101010 00 or
0 0101010 00
Take one of the company with more number of elements.
Put all of them in a line. Then take other company's elements put them in such a way that they are close to center of first company and none of them is adjacent. Here is an example for 3, 8 :
0 0 0 1 0 1 0 1 0 0 0
0 means first company and 1 other.
Then calculate cost of this sequence O(N).
To be honest, I find this with bruteforce, Unfortunately i cant give you a proof.
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
The answer could be declarated in long long.Your mistake is not because of that.
I got WA because I modulo the first number also.
The second number can be very huge (if not modulo), but the first number can't. It always fits the 64-bit signed integer type. So it's neccessary to get modulo the second number only.
What's happening with C problem?I see people which 3 seconds ago didn't have it solved and now they got AC..
Yes , I could submit it after time over!!!!!!
How did you solve it?
I didn't I just tried to submit some files after time over and got message that submission is successfully sent and my solution judged as Wrong answer
That could be practice, what's important is whether it's shown in the scoreboard.
that what I first thought but then I saw the comment of geniucos so I think now something is wrong!
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?
first, u should write your criticism in their blog not here. your rank changed because of their score calculation method, it depends on the number of the successful submits.
Surely I will also write it in the blog.
But it changed suddenly! It means suddenly around 180 people got accepted?
no, you were not the only person in 199 place, I think there were more then one person with same score, and when the number of successful submit passed 360, your rank changed.
Oh I see. I didn't know about the specific 360 number rule!
Thanks
I am not sure about 360, I just said it because of Mr Xellos said so.
No matter. Surely there must be a specific reason for the sudden change!
same here for problem B :| in sample output first number was number of ways and second one was minimum but i got wrong answers and when i swapped two numbers i got ACC !
They should rejudge the problems which had syntax problems in their statements!
The problems were also so hard as a shortcut round! (At least for me as a 14 year old one). How is the elimination and final round going to be ???? Maybe F div1?
Contest is over and system is down. Can somebody provide his/her testdata (input and output) for checking the solution for problem B?
http://ideone.com/tebWCA
Output: http://ideone.com/2zdgK6
I couldn't submit too :( my solution gives correct output for all test cases a+b<=20, so I think it's correct.
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.
I got AC assuming that one-symbol password satisfies this condition.
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
Why would it be wrong? I assumed that and got AC, maybe you made a mistake somewhere.
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.
I suspect that you don't need escaping in r'' literal here:
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.
У меня одного не открывается страница с контеста(условия, положение)?
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 :]
Where are the final standings??
The top 5 list is on the Persian blog. They said They'll release the full list soon...
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.