Блог пользователя Arpa

Автор Arpa, история, 9 лет назад, По-английски

Hi!

I'm honored to invite you to Codeforces Round #383, it will be held on 6nd December 14:35 UTC. There will be 5 problems for each division as usual. The contest was prepared by AmirReza Arpa PoorAkhavan and Mehrdad Batman Saberi. It's our first official contest at CodeForces.

The contest stories will be about Arpa and Mehrdad and some events happen with them in Arpa's land, in addition you will get some information about Arpa's land and girls living there (Owf (t = 1)).

I'd like to thank myself (:P) and Mehrdad at first, then Nikolay KAN Kalinin for helping me in preparing problems and Mike MikeMirzayanov Mirzayanov for the great Codeforces and Polygon platforms.

The scoring distribution will be announced later.

Answer for one of your common questions : -Yes, It is rated.

UPD. GL & HF. Hope you came up with Dokhtar-kosh solutions for our Dokhtar-kosh problems.

Urgent information from MikeMirzayanov: due to hardware issues, the round is moved to Tuesday 6th December, 14:35 UTC. We are very sorry this happened. More information is available in this post.

UPD. Scoring distribution: Div.1 : 500-1000-1250-2000-2500, Div.2 : 500-1000-1500-2000-2250.

UPD. Contest is over, hope you have been Joon-Joon of the round :P

Congratulations to winners:

Div.1:

1 . EvenImage

2 . mnbvmar

3 . data_h and nuip (WoW :O)

5 . Phronesis

Sepcial congratulations to anta who solved Div.1 E.

Div.2:

1 . gilcu3

2 . toHisDream

3 . Far

4 . shpsi

5 . orz_liuwei

Editorial is ready.

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

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

what does that (t=1) mean???

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

Hope the english translation is better than this blog !

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

Hope this time I won't fall back to div2 immediately :D

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

the new question should be: will the problemset contain googable problems??? is it rated became too old :D

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

Hope to become green again guys pray for me!!

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

Since, no one asked this above and there is no seriously hated down-voted to hell comment above, I would like to ask this: Is it rated?

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

number 383 is prime && palindrome! :)

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

I've been waiting for along time to see how Batman can do in problem setting
I'm very exciting , hope you guys won't disappoint us

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

I like the characters of Arpa and Mehrdad
who did paint them or they have copied from the Internet ?

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

The Codeforces is begging me to "Register Now" and also asks me to pay attention...

Try to control your site admins... It has some devil plans...

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

Glad to see our Codeforces is back! Thanks to the maintainers' hard efforts.

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

your graph is really inspiring Arpa ! :)

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

Isn't it weird that you didn't want to thank GlebsHP?

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

i wish you will make a good contest brother Arpa .good luck for all.

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

it's my birthday guys.:) i get my rate up .

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

As you gave thanks to yourself, you needed to thank us (contestants ) also :/

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

is it usual ?

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

God with us, brother.

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

What is this "In the name of God" thing?

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

I hope I get to feel the colour cyan. Just 6 points away from it.

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

Are problems on russian?

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

hope for becoming blue finally

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

After 7 months, I am back. :)

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

Come back Codeforces after nearly 2 years. Wish me good luck!

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

And, I'd like to thank myself (:P) for reading Arpa's Blog :D

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

how to make codeforces in English again it became in russian ?

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

hope the contest be cool as the painting. (but i guess mehrdad's eyes(in the painting) are saying it's gonna be hard enough! :D)

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

yayyy, another Persian contest. Hope to see funny problem statements like PrinceOfPersia's problem statements :D

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

I hope you guys will be the same active in comments after the contest. People usually need you so much right after contest ends...

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

Just curious. In the name of which god do you write?

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

Codeforces сегодня тормозит и иногда вовсе отказывается работать, надеюсь во время раунда всё будет в норме!

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

I have a question... what does the word "dokhtar kosh" mean?!

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

It will be my first contest. Hope for a good start :)

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

Trust in Codeforces — there are so much lags and troubles with logging in and refreshing pages today.

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

I just want to know the meaning of "t=1", don't care if I lose some rating xD

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

Raise your hand if you think the contest will be delayed, postponed or at least won't run smoothly :/

Even if the problems turn out to be very good, it's not a good day for contest given the state of the servers. I feel bad for the writers :(

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

383 is a prime number :)

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

Glad to see that my student is becoming the master, good luck Arpa ;)

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

Urgent information from MikeMirzayanov : due to hardware issues, the round will be moved. what it means by "MOVED"?

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

Should we participate in the round ? The site is so buggy .

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

Let me register on div2!

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

Delayed for 4 days. "Big drama show".

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

Before Contest 00: 47: 10

Refresh

Before Contest 4 days

Had to check couple of times whether I was seeing it right.

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


То чувство когда раунд перенесли.

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

Issues issues and more issues. Last time with the copied problems thing, I thought of posting a comment regarding the issues that have taken place with CF in the last 3 months.(8+ issues).

However, I shall not post any disrespectful comments as anybody at Codeforces is not answerable to us, but this rising number of issues is very difficult to deal with to say the least.

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

NOOOOOOOOO , :'(

Urgent information from MikeMirzayanov : due to hardware issues, the round will is moved to Tuesday 6th December, 17:35 UTC. We are very sorry this happened. More information will be available later.

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

Better delayed than long queue/unrated. :)

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

LETS BOYCOTT CODEFORCES FOREVER FOR "BEING ISSUEFORCES"

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

StayStrongCodeForces

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

oh mike, faz isso com nois nao, senao nois te quebra

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

Sad because of delay(

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

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

কেনে চলর?

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

IT SEEMS CODEFORCES SERVER HAS GOT IMPROVED AFTER THE UPDATE OF DELAY

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

At least site is working and we are not seeing "...due to some hardware issue, CF will be unavailable until 10 January 2017"

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

Deleted

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

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

GET WELL SOON CF!!!

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

Actually, computer scientists from codeforces developed some way to time-travel. But due to hardware issues, they could not go back to now. :)

I prepared a bottle of caffine drink and luckily I just took a little sip of it. I think I can sleep tonight.

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

Make Codeforces great again. ._.

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

Hardware Issues :P

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

:S :S

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

:/ I waited and waited whole day for the contest!! now I change the sentence- I wasted and wasted whole day for the contest :'(

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

Till now the most frequent comment was "Is it rated ?"

Now it'll be "Will it be delayed?" or "I hope it won't be delayed" or "Is the hardware ok?"

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

since the contest is 4 days delayed, I think there'll be higher number of registrations and thus more participation!

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

Where is Chinese?

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

http://prntscr.com/derzh8 OWF(t=1) ? What.

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

I don't feel good about this contest.

first it was postponed and second JESUS CHRIST did anybody read the comments on this blog ??? someone should delete them this is codeforces for god's sake...unless god is participating in the contest do not bring up religious talks here there are a ton of sites for that.

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

Arpa you are going to make record for highest registration may be participation also

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

I hope today it won't be delayed again..

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

I was on a trip when the Contest was held but then I got home and it had been moved... so happy ^^!

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

Good Luck

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

Is this going to be the largest CF Div 2 in terms of registrations? Any Pinch on statistics?

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

What if there are 8500 participants :O

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

Scoring Distribution ?

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

What's up with the long queues -_-

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

The queue is killing me T_T

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

In Queue :(

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

For > 5 minutes my submission is in the queue...

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

I've locked a problem but it won't allow me to see other people's submissions, why?

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

Merhdad's girlfriend's reaction (if he has) to problem D (and the word "Hos" that he calls girls with) must be interesting!!!

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

Too many girls in problem statements :D Arpa ?

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

I am the god of lock problems...

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

Awesome problems, guys!

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

I wish I had hacked myself. T__T

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

To be honest the contest isn't interesting, speed contest, first 2 are easy the rest hard ((.

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

Hack case for Div 1A :
Make simple cycles of odd lengths, i.e each node belongs to exactly one cycle of an odd length.
Using 99 nodes, you can make simple cycles of lengths 3, 5, 7, 9....17.
The answer for such a case would 14549535.

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

I hacked 6 and got hacked...maybe next time I should try to solve E...

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

Is O(nk2) dp the intended solution for Div1-B?

And how to solve C?

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

Is div1 C 2-SAT?

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

Worst feeling known to humanity: the realization that your solution is wrong after locking the problem

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

    Oh, same here! For some reason, I forgot that I couldn't submit anymore and thought I had found some pretty cool cheat. My idea was to open the source of the one who hacked me, then rewrite it myself and submit it. It sounded brilliant to me until I tried to submit it :D :D :D My biggest facepalm ever, something strange happens with me these days :D

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

Hello sorry but for further contests i believe you need to be more specific about what you want in the problems for example in problem B div2 when you say pairs, you don't say distinct pairs or plain pairs, example input does not help to clarify this and this could lead to unnecessary wrong answers. (not in my case since i had it all wrong but you get the idea)

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

Any hack for problem C.

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

I'm new here. Pardon me if I say something irrelevant. Will the explanations of the problems be given after the contest? :/

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

    Yes, the editorial will be posted within few days :)

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

      Thank you very much mister ^_^ can you help me with another thing? What is "hack" that everyone keeps talking about?

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

        There are a set of tests called pretests which your submission is tested on during the contest. These tests aren't entirely comprehensive so your solution could still be wrong even if it passes the pretests. After passing pretests, you can "lock" your problem (meaning you can no longer resubmit it) and then you're allowed to look at the code of other people in your room (everyone is assigned a room in the beginning of the contest). If you think someone's code is wrong, you can give it a counter test case and if it is wrong, then you get an extra 100 points but if your test case is wrong, you lose 50 points.

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

I saw someone in my room successfully hacked 10 times.(div 2)....

And now I'm thinking about my life.

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

Does Div2C/Div1A has anything to do with floydWarshall ?

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

    No, just find all the cycle lengths and calculate the LCM. Beware cycles with even length.

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

      I'm confused about how you came up with that. Did you just notice a pattern or is there some kind of reasoning for why that's the solution?

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

        First, notice that all nodes must be within cycles (a node outside a cycle can't be reached by any of the nodes he reaches, by cycle definition, so we'll never satisfy the property of the problem).

        Then, considering a and b in the same cycle, the only way to satisfy a --(t steps)--> b and b --(t steps)--> a is if a == b (and then t = size of cycle) or if b is halfway from a on the cycle and a is halfway from b on the cycle (and then t = half the size of cycle) — which is only possible if cycle length is even.

        So cycles of even length will satisfy the mentioned property when t is multiple of length/2, cycles of odd length will satisfy the property when t is multiple of its length. And then the LCM of these will give the minimum t where the property is satisfied for them all :)

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

I can't even code knapsack!

Wrote i++ instead of j++ . Literally 1 character mistake. ;_;

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

Can not believe C was solved by a lot of people. Maybe I understood in a wrong way.

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

Problem A and B sooo hackable! For A problem! in
0 out 1 For B problem! in 2 0 1 1 out 1 But someones' answer 2

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

I'm not too sure, but I suspect that the girls in Arpa's land are attractive to look at.

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

While B was too easy and boring (I even spent some time re-reading the statement two times to see what I missed), problem C was very nice. And it may be argued but I would write "note the unusual constraint for the alphabet size" in problem D because it was extremely easy to miss (and it's indeed very unusual constraint). Thanks for a nice contest!

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

Arpa, why did you hide your article "DSU on trees"? Still available with google cache :) I guess Div1D can be solved with it (though I didn't manage yet).

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

enot110 has a very interesting solution for Div 1C...

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

the hacking round....

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

Can anyone tell me why my solution to problem B is wrong? (it got wrong answer on pretest 11):

long long int count_anwser() { long long int ans = 0; for(int i = 0; i < numer_of_elements; ++i) { int needed_number = tab[i]^x;

ans += count_of_this_numer[needed_number];
    count_of_this_numer[tab[i]]++;
}
return ans;

}

where count_of_this_numer is number of elements which are equal to index

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

Interesting problems accompanied by a super fast system testing. Thanks for the nice contest guys :)

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

Ровно 10000 участников)

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

I solved problem div2 D using this technique [ DSU + 0-1 knapsack + dp ]:

  1. make groups with DSU

  2. With the 0-1 knapsack, take the max of:

    i) try to invite each group whole

    ii) try to invite a single person of this group(try with each member)

    iii) don't invite anyone at all

  3. store the max in dp and return it

What's wrong in my algorithm or in code ?

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

Can problems of the type of Div1C in general have flow solutions? I know here n ≤ 105, but I'm interested to know if these problems where every k consecutive people satisfy some property can be solved with flow.

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

In problem D, the constraint that all letters are between 'a' and 'v' is very well hidden in the input section and not emphasized at all. I'm pretty sure it cost Swistakk an Accepted on it, and it cost me a submit and half an hour more to implement it.

I think such unusual constraints should be highlighted because it's very difficult to spot them otherwise.

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

    I don't know why you mentioned me, but my code was just a bit too slow (and memory consuming, but that can be fixed with one line). I really dislike that problem, it is rather obvious what is the solution and whole "fun" is winning with strict TL what is dependent on details of implementation :|.

    However, indeed I had an idea to create a static array of size 2|Σ|, but 226 was too much. Either way, I needed to create such arrays, so I needed |Σ| ≤ 21, 22 was still too much :D.

    And yes, I definitely agree with your point, that constraint was extremely easy to miss, it should have been emphasized.

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

Two non-similar codes 22748780 and 22758461 from the same country.

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

i think there is a mistake in problem D on DIV2 int the statement you say " Along with that, from each friendship group he can either invite all Hoses, or no more than one" you didn't say that i can take no one from this group

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

What is the intended time complexity of D and E? O(Nσlog N) in D and O(Nsqrt(Nlog N)) in E?

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

me when i see a girl from Arpa's land :3 :3 :v

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

What is the reasoning behind problem E?

I understand the first part. The quite obvious idea of sorting implicit strings with hashes is not brand new and (usually) not very pleasant to implement, but nevertheless, it is OK for Div1E.

I understand the second part. The quite obvious idea of splitting K-s into small and large and answering queries in is not brand new and (usually) not very pleasant to implement, but nevertheless, it is OK for Div1E.

And now, if you think that it is really interesting to combine two completely unrelated to each other nasty idealess implementations into one Div1E problem, be the first to throw a stone at me.

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

    Firstly, I agree that the problem isn't very imaginative. However, I think as far as difficulty goes, it deserved to be where it was, seeing as only anta solved it in contest — I found it very hard to code it in 2 hours and only solved it afterwards. I do understand your point though.

    Secondly, the complexity you mentioned for queries isn't fast enough. Instead we need to use both range trees (for K<=50) and sparse table (for K>50 so that N/K <= 2000). However, this does actually prove your point about how it was nasty to implement.

    So I agree that it wasn't beautiful as you would expect for a Div1E, but I would argue it isn't too trivial to 'see' the solution either.

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

    Sorry, I skipped your comment suddenly because I was busy that time.

    Note that hashes are not allowed. I had banned solution with hashes, if you use mod = 2x, you'll get wrong answer, otherwise, you'll get TLE because modulo operations.

    Why you want to mock my problem? Let's talk more in privet messages, shall we?

    (Thanks to Errichto, I was writing a mocking comment because I was angry, he told me not to do)

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

I want to go to Arpa Island. ♥

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

Hello,

Could someone help me with a little explanation?

I tried to hack this code for problem B during the contest:

http://pastebin.com/TJHFm3s8

I was expecting it to give runtime error since there is an array out of bounds access on the test that I've provided (you can see there is truly such an access if you comment out the cout... it will try to access the array at position 131071 but the array is only 100005 long). However, even though there's an out of bounds access it doesn't give runtime error. Can someone explain why?

Thanks in advance.

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

    I guess it depends on the compiler.
    You can test cf compiler here: http://mirror.codeforces.com/problemset/customtest
    Here is my conclusion after testing:
    If the array is declared in global, then out of bounds will print 0. However , If the array is declared in the function, out of bounds will give run-time error.

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

      That's not true either. I have seen codes which declared the array globally and got RE (my own code does that if I comment out the line which checks this).

      It really doesn't seem fair to me that some sources got accepted with this problem while others got RE for the same issue. Applied to hacks as well (especially to hacks). Haven't seen this happening on any other online judge.

      Oh well.

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

    There is also a variable 'b' with size 100.000. Variable 'a' is a pointer and when you access a[ 131.071 ], you basically access a + 131.071. 'b' is allocated after 'a' so you will access b[ 31.071 ]. Not sure if this works only on global variables but i think this is something that depends on the compiler and language. If you would access a[ 250.000 ] ( this will be equal to b[ 150.000 ] i guess ), that will go out of every variable and that should give runtime error.

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

      Thing is you access b[131K].. not a[131K]. And b is declared after a.

      At any rate... we can speculate on this all we want but the truth is array out of bounds is classified in C (and C++) as undefined behavior. Which means we can speculate all we want but the details of this are compiler-specific.

      Therefore, the CF crew is not at fault here. It's just sad that some people got accepted with a bug in their code while other people got RE on the same bug. But oh well, what can you do ¯\_(ツ)_/¯

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

Same code but why RE for using Array and AC for using map (STL). [problem:][problem:742B] RE: 22763251 AC: 22763425

All data set <= 100000. i am used 100005 in array size. but got RE. why?????????????????? Explain please.

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

Can anyone help me in Div2 B?

I first sorted the given array, then if a^b=x then b=x^a. Since it is sorted I can find out the number of occurrences of b in the array by upperbound-lowerbound. (I checked for non occurrence seperately).

Thank You.

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

In div1A and div2C pretest 4 is as follows

5

2 4 3 1 2

In this wouldn't the ans be 3 as 1 calls 2. Then 2 calls 4. 4 calls 1 giving t=3

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

Finally I'm green :)

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

Where's tutorial?

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

I think today's problemset(Div.2) was awesome. One of the best contests in Codeforces in recent times by far.Though my own performance wasn't the coolest, but really got inner peace just by thinking and formulating the solutions. :P :P. Thanks to the authors and co-ordinators. Great job guys. :D :D

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

Two code are same . In the problem B constraint for 1 ≤ ai ≤ 100000 . IN one code I used frq array for frequency got WA on 11 . But when i USed MAP for frequency , then got AC . That means constraint for ai is not correct . My two submissions are 1) With MAP frq 2) With frq array .

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

LARGEST NO OF COMMENTS ON ANY CONTEST ANOUNCE'' PAGE EvenImage >Petr

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

Whats special with even cycle in Div2 C? why we need to half them ?

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

    In an odd cycle, the only way that if the round of X ends in Y then the round of Y ends in X with a certain t, is if X=Y. Nevertheless, if the cycle length is even, it can Y can be the "midpoint" of the X cycle. Think of the following case: 2 2 1 (Sorry, I don't know how to format the test case properly)

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

how to do div2 E

first you must know -1 is impossible.

then you can do such thing

while(1){
check if 3 same
if same,then random 1-3 ,and swap him with his wife.
if you do 2n times and find everything fine,then break
}

here is code 22763097

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

Really outstanding contest!

Short problem statements, elegant pictures for every problem, interesting legend and such a extraordinary editorial. After this contest I feel a very pleasant aftertaste, because I see that every effort was made to make this contest brilliant. And it is.

I feel satisfied. Thank you a lot.

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

had a nice starting for the problems "arpa land has very nice girls" :D

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

Could someone help me debug my solution? http://mirror.codeforces.com/contest/742/submission/22769800
thank you!

EDIT: I found the mistake, if anyone was wondering it's accessing the array with i%2, those arent the iterations of the dynamic but the index of the group.

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

i wanna make deeeeeeeeeeeeeeeeeeeep replays