By BYN, 6 years ago, ,

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:

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

 » 6 years ago, # | ← Rev. 3 →   0 hooray bayan again!!!
•  » » 6 years ago, # ^ | ← Rev. 2 →   -10 .
•  » » » 6 years ago, # ^ |   -31 Iranian style contest
 » 6 years ago, # |   +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?
•  » » 6 years ago, # ^ |   +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
 » 6 years ago, # | ← 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?
•  » » 6 years ago, # ^ |   +19 "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.
•  » » » 6 years ago, # ^ |   +11 The country that issued your passport is our criterion. What if multiple countries satisfy this requirement?
•  » » » » 6 years ago, # ^ |   +40 Good for him!
•  » » » » » 6 years ago, # ^ |   0 May you explain the algorithm of choosing participants of final event? only one competitor from each country is gonna be chosen?!
•  » » » » » » 6 years ago, # ^ |   0 Exactly.
•  » » » » » » » 6 years ago, # ^ |   +8 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)?
•  » » » » » » » » 6 years ago, # ^ |   +17 Yes. The winner of shortcut! may meet a fellow citizen at the final.
•  » » » » » » » » » 6 years ago, # ^ |   0 hi,can you tell me the link of shortcut ,thanks very much.
•  » » » 6 years ago, # ^ | ← Rev. 2 →   0 How will you find out where his/her passport is issued?
•  » » » » 6 years ago, # ^ |   +9 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.
•  » » » » » 6 years ago, # ^ |   0 :| I mean how will Bayan team find this out.
•  » » » » » » 6 years ago, # ^ |   0 They also only need to look :D
•  » » » » » » » 6 years ago, # ^ |   0 When? When they get to Iran?!
•  » » » » » » » » 6 years ago, # ^ |   +7 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!
 » 6 years ago, # |   +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)
 » 6 years ago, # |   +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!
•  » » 6 years ago, # ^ |   +78 You won't be able to qualify even from Antigua and Barbuda boy!
 » 6 years ago, # |   +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.
•  » » 6 years ago, # ^ |   +1 Not good enough, since someone can have multiple passports and pick the most convenient one.
•  » » 6 years ago, # ^ | ← Rev. 3 →   +87 https://www.henleyglobal.com/citizenship-cyprus-citizenship/Cyprus citizenship — 2500000 euroChance to compete in the final — priceless
•  » » » 6 years ago, # ^ | ← Rev. 2 →   -21 Sorry for my previous comment :)
 » 6 years ago, # |   +2 video clip is nearly 8 minutes. not 4
•  » » 6 years ago, # ^ |   0 Fixed. Now it is!
 » 6 years ago, # |   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".
•  » » 6 years ago, # ^ |   -30 I love bayan contest.:D
•  » » » 6 years ago, # ^ |   +20 I didn't know that cheaters love bayan contest too :)
•  » » » » 6 years ago, # ^ |   -33 please stop:(
•  » » » » 6 years ago, # ^ |   +4 :) cheaters have a low rate in contribution!
•  » » » 6 years ago, # ^ |   +7 for cheaters yeah but for other not
•  » » » » 6 years ago, # ^ |   -24 I don't cheating. ok ok I'm a cheater ok :( :(
 » 6 years ago, # |   +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)!
 » 6 years ago, # |   -14 thanks for giving.....Best Oracle Training in Chennai
 » 6 years ago, # |   0 I ❤ ❤ ❤ ❤ IRAN
 » 6 years ago, # | ← Rev. 3 →   -9 IGNORED
 » 6 years ago, # |   +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 :)
•  » » 6 years ago, # ^ |   +11 As mentioned on the FAQ, there is no age, gender or religion restrictions.
•  » » » 6 years ago, # ^ | ← Rev. 2 →   0 Well, most underage people must be accompanied by an adult abroad, so will accomodation (and travel expenses for top10) be provided for the adult?
•  » » » » 6 years ago, # ^ |   +18 Bayan will pay the accommodation cost in that case.
 » 6 years ago, # |   +28 Does it mean only one Iranian Competitor can advance to the final round? because the last contest has different rules for Iranian participants.
•  » » 6 years ago, # ^ | ← Rev. 3 →   +6 here, they said 40 competitor from Iran can advance to final round.
•  » » 6 years ago, # ^ | ← Rev. 2 →   0 deleted!
 » 6 years ago, # |   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.
•  » » 6 years ago, # ^ |   0 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.
•  » » » 6 years ago, # ^ |   +8 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
•  » » 6 years ago, # ^ |   0 It's easier to stay awake till 6am, than to wake-up at 6am.
•  » » » 6 years ago, # ^ |   +3 Maybe easier.. But bad for a contest
•  » » » 6 years ago, # ^ |   0 But is it easier to do well in a contest after staying awake till 6 AM or after waking up at 5:30?
 » 6 years ago, # | ← Rev. 2 →   +29 are the rules of the contests like ACM ? or something else?
 » 6 years ago, # |   +4 How I can see, which users was registered at Shortcut! ?
•  » » 6 years ago, # ^ |   0 You have to wait for the rank list.
 » 6 years ago, # |   +1 Update: Shortcut! round terms & rules has been added to this post.Please make sure to read it carefully.
•  » » 6 years ago, # ^ |   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.
•  » » » 6 years ago, # ^ |   0 Thanks for sharing this trick :D
•  » » » 6 years ago, # ^ | ← Rev. 2 →   0 "I suppose there's instant feedback, then.Will there be a public scoreboard?In shortcut! round, scoreboard will be only available to the registered users.
•  » » » 6 years ago, # ^ |   +2 "... 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.
 » 6 years ago, # |   0 Registered contestants will have access to the contest area from one hour before the start.
•  » » 6 years ago, # ^ |   +10 I keep on getting a 500 error "500 Oops!Something's not right."
•  » » » 6 years ago, # ^ |   0 Getting the same thing.
•  » » » 6 years ago, # ^ | ← Rev. 2 →   0 we will be out of maintenance mode very soon./ we are back.
•  » » » » 6 years ago, # ^ |   +5 When :(
 » 6 years ago, # | ← Rev. 2 →   +23 May one see the verdict of judge for his submission right after submission?
•  » » 6 years ago, # ^ | ← Rev. 2 →   0 Yes of course.
 » 6 years ago, # |   +20 C'mon! Safari 7.0.6 is considered an old browser?
•  » » 6 years ago, # ^ |   +20 The same error for Yandex Browser 14.7
•  » » » 6 years ago, # ^ |   +3 Kinda stupid restrictions for the browsers. Opera 23 is not supported too. Bad for you.
 » 6 years ago, # | ← 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 :/
•  » » 6 years ago, # ^ | ← Rev. 2 →   0 No, accessing the arena delayed by 30 mins.UPD: It's now available.
•  » » 6 years ago, # ^ |   +3 No. Contest will start in its time.
•  » » » 6 years ago, # ^ |   0 Sorry, earlier I thought it was to start at 6:00 pm (IST).Thanks.
•  » » » 6 years ago, # ^ |   +8 Is it just me.. or are the problems not there?
•  » » » » 6 years ago, # ^ |   +3 Problems? The arena is not there for me. Just 500 for half an hour now.
•  » » » » » 6 years ago, # ^ |   +3 I managed to load the arena a bit earlier, but now it is giving the same error as you stated.
•  » » » 6 years ago, # ^ |   +3 however contestants won't be able to start at all
 » 6 years ago, # |   +39 502 Error
•  » » 6 years ago, # ^ |   0 Ditto.
•  » » 6 years ago, # ^ |   +20 Mine is "504 Gateway Time-out".
•  » » » 6 years ago, # ^ |   +9 502 error :(
•  » » » 6 years ago, # ^ |   0 Now I'm getting 504 as well
•  » » 6 years ago, # ^ |   0 Same! Can't get contest :(
•  » » » 6 years ago, # ^ |   0 flake get on WOOT
•  » » » » 6 years ago, # ^ |   0 GOOD getting problems to load >:D
•  » » » » » 6 years ago, # ^ |   0 You, at least, got them. I still can't see any of them
 » 6 years ago, # | ← Rev. 2 →   +24 Unsuccessful start of the contest :(edit: Unsuccessful contest :(
 » 6 years ago, # |   +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.
 » 6 years ago, # |   +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.
•  » » 6 years ago, # ^ |   0 At me it still doesn't work.Does anybody know how to solve the 502 error?
•  » » » 6 years ago, # ^ |   +10 It's not a part of the contest, you can't solve it.
•  » » » » 6 years ago, # ^ |   0 Very hard, I opened the arena.Now, where can I find the problems?
•  » » » » » 6 years ago, # ^ |   +13 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.
 » 6 years ago, # |   0 Unable to load the website. It's giving 502
•  » » 6 years ago, # ^ |   0 i got the problem now.. its working. How do i get the input file though?
 » 6 years ago, # |   +8 Input and output section contain the same information!
 » 6 years ago, # |   +42 best contest ever...
 » 6 years ago, # |   0 bayan just went down while i was submitting :(
•  » » 6 years ago, # ^ |   +4 You are lucky.I can't see the problems
 » 6 years ago, # | ← 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...
 » 6 years ago, # | ← 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.
•  » » 6 years ago, # ^ |   0 You've done well! :D It doesn't worth enough!
•  » » » 6 years ago, # ^ |   0 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.
»
6 years ago, # |
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  •  » » 6 years ago, # ^ | ← Rev. 4 → +24 I'll post B and C then.Problem BA 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.InputThe 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.OutputFor 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.Constraints1 ≤ T ≤ 1000 ≤ a, b ≤ 1061 ≤ a + b Problem CA 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?InputThe 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.OutputFor 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.Constraints1 ≤ T ≤ 1001 ≤ n ≤ 5000 ≤ p, xs, ys < 10^90 ≤ x1 ≤ x2 < 10^90 ≤ y1 ≤ y2 < 10^9  » 6 years ago, # | +9 Very hard contest indeed, Nobody solved anything :D  » 6 years ago, # | +187 Okay, I've now seen all three problems — 500, 502 and 504...  » 6 years ago, # | 0 site not working!!  » 6 years ago, # | 0 I cannot even see the problems.This message appears: "Maintenance The server is temporarily unavailable." What should I do now?  » 6 years ago, # | +8 The feeling when you code a task for 5 mins exactly, but to read and submit it you need 15 more. Okay  » 6 years ago, # | -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... •  » » 6 years ago, # ^ | 0 http://prntscr.com/4hmvmp Lol what? •  » » » 6 years ago, # ^ | ← Rev. 2 → +7 Yea... I though you're supposed to calculate the number of ways to do something... but printing the input is fine too, I guess :DEDIT: Quite impressed that someone actually solved it correctly, I got no idea whats the output.. •  » » » » 6 years ago, # ^ | -8 Well I think they want the minimum distance and the number of ways how to obtain it, but lets listen to the statement? :D  » 6 years ago, # | +37 task B:InputThe 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.OutputThe 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! •  » » 6 years ago, # ^ | +43 the problem is very easy, Just output the input •  » » » 6 years ago, # ^ | 0 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 :. •  » » » » 6 years ago, # ^ | +3 Why do you can't submit? •  » » » » » 6 years ago, # ^ | ← Rev. 2 → +25 You need to press the button 1000000007 times in 8 minutes to submit succesfully, that requires some skills  » 6 years ago, # | +111 Maybe you'll use CF platform for next edition of Bayan instead of trying to invent your own?..  » 6 years ago, # | ← Rev. 2 → -8 Ignore, the same idea posted before  » 6 years ago, # | 0 How do you read the .in file? •  » » 6 years ago, # ^ | -8 Like you would do every other one •  » » 6 years ago, # ^ | ← Rev. 2 → -29 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). •  » » 6 years ago, # ^ | 0 Tbh i just copied it into my notepad. •  » » 6 years ago, # ^ | 0 then how to make .out? •  » » » 6 years ago, # ^ | 0 You dont have to. submit your .txt file •  » » » » 6 years ago, # ^ | 0 how to copy the output from cmd to np++? •  » » » » » 6 years ago, # ^ | ← Rev. 2 → 0 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.out commands by running your .exe from cmd. •  » » » » » » 6 years ago, # ^ | 0 I see. thanks  » 6 years ago, # | 0 Such enjoyable contest :\ •  » » 6 years ago, # ^ | 0 Very enjoyable! •  » » 6 years ago, # ^ | +14  » 6 years ago, # | +45 Did they give us an extra 40 minutes because of their incompetence, or is the timer bugged like everything else?  » 6 years ago, # | +22 The contest length increased??? 45 minutes remaining???  » 6 years ago, # | +34 I hope these mess won't happen in the Warm up round (the one hosted on Codeforces). I don't like unrated rounds. •  » » 6 years ago, # ^ | 0 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. •  » » » 6 years ago, # ^ | ← Rev. 2 → +31 After seeing this, I am very very excited for the codeforces contest tomorrow... even though it is at 3:30 AM.  » 6 years ago, # | ← Rev. 2 → 0 It looks like I can't sign out. Contest site is more "unsecure" than browsers it bans.  » 6 years ago, # | ← 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 ?? •  » » 6 years ago, # ^ | +11 Tourist didn't win, so yes, is hard to predict the winner.The strange thing is that the tasks weren't so easy... •  » » » 6 years ago, # ^ | 0 I lost bet on the winner! :(It was so strange... •  » » 6 years ago, # ^ | +17 Maybe it was a bug causing 5-stars problems to appear instead of 2-stars problems  » 6 years ago, # | 0 And this persisted throughout.  » 6 years ago, # | +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? •  » » 6 years ago, # ^ | ← Rev. 2 → +12 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) •  » » » 6 years ago, # ^ | +1 really??? how can you arrange it? A greedy solution? •  » » » » 6 years ago, # ^ | +3 Yes.You alternate somewhere at the middle 0 and 1.Something like this:00 0101010 00 or0 0101010 00 •  » » 6 years ago, # ^ | +9 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.  » 6 years ago, # | -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 •  » » 6 years ago, # ^ | +1 The answer could be declarated in long long.Your mistake is not because of that. •  » » » 6 years ago, # ^ | -8 I got WA because I modulo the first number also. •  » » 6 years ago, # ^ | +8 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.  » 6 years ago, # | +3 What's happening with C problem?I see people which 3 seconds ago didn't have it solved and now they got AC.. •  » » 6 years ago, # ^ | +5 Yes , I could submit it after time over!!!!!! •  » » » 6 years ago, # ^ | 0 How did you solve it? •  » » » » 6 years ago, # ^ | 0 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 •  » » » » » 6 years ago, # ^ | 0 That could be practice, what's important is whether it's shown in the scoreboard. •  » » » » » » 6 years ago, # ^ | 0 that what I first thought but then I saw the comment of geniucos so I think now something is wrong! •  » » 6 years ago, # ^ | 0 notification didn't show like CodeForces so we didn't know the contest extend for 45' @@  » 6 years ago, # | +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? •  » » 6 years ago, # ^ | 0 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. •  » » » 6 years ago, # ^ | +1 Surely I will also write it in the blog.But it changed suddenly! It means suddenly around 180 people got accepted? •  » » » » 6 years ago, # ^ | 0 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. •  » » » » » 6 years ago, # ^ | +1 Oh I see. I didn't know about the specific 360 number rule! Thanks •  » » » » » » 6 years ago, # ^ | 0 I am not sure about 360, I just said it because of Mr xellos said so. •  » » » » » » » 6 years ago, # ^ | ← Rev. 2 → +1 No matter. Surely there must be a specific reason for the sudden change! •  » » 6 years ago, # ^ | +1 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 ! •  » » » 6 years ago, # ^ | +1 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?  » 6 years ago, # | ← 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? •  » » 6 years ago, # ^ | ← Rev. 2 → +5 http://ideone.com/tebWCAOutput: http://ideone.com/2zdgK6I couldn't submit too :( my solution gives correct output for all test cases a+b<=20, so I think it's correct.  » 6 years ago, # | 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. •  » » 6 years ago, # ^ | +4 I got AC assuming that one-symbol password satisfies this condition. •  » » 6 years ago, # ^ | 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 •  » » 6 years ago, # ^ | +1 Why would it be wrong? I assumed that and got AC, maybe you made a mistake somewhere. •  » » » 6 years ago, # ^ | ← 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' 
•  » » » » 6 years ago, # ^ |   0 I suspect that you don't need escaping in r'' literal here:  re.match(r'.*[\!@#\\$%\^&\*].*', p): 
 » 6 years ago, # |   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.
 » 6 years ago, # |   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 :]
 » 6 years ago, # |   +23 Where are the final standings??
•  » » 6 years ago, # ^ |   0 The top 5 list is on the Persian blog. They said They'll release the full list soon...
•  » » » 6 years ago, # ^ | ← Rev. 2 →   0 The winners of the shortcut! round also have been announced here: codeforces.com/bayan2015
 » 6 years ago, # |   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.
 » 6 years ago, # |   0 Anyone solved problem B in Shortcut! round ?