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

Автор BucketPotato, 2 месяца назад, По-английски

Hi Codeforces!

Thanks to the 76 people who came in person to the Bay Area Programming Contest this year, and of course our 29 virtual teams!

The contest has been uploaded to the gym here, and is available for virtuals or upsolving.

We hoped you enjoyed the problems as much as we enjoyed organizing! Please let us know in the comments if you have any questions or concerns.

UPDATE: the model solutions (and some extras) to all problems are posted at this link.

UPDATE: written editorial is now available here.

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

»
2 месяца назад, # |
  Проголосовать: нравится +26 Проголосовать: не нравится

Great contest, loved the food. Looking forward to next year!

»
2 месяца назад, # |
  Проголосовать: нравится +21 Проголосовать: не нравится

ench orz

»
2 месяца назад, # |
  Проголосовать: нравится +41 Проголосовать: не нравится

tysm for the contest it was so fun :3

»
2 месяца назад, # |
  Проголосовать: нравится +27 Проголосовать: не нравится

ezraft orz

»
2 месяца назад, # |
  Проголосовать: нравится +24 Проголосовать: не нравится

Really enjoy the contest! Hope it becomes 5-hours contest next year

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

    Thanks! We set it at 3 hours because we expected there to be many beginner teams that would have trouble working for a full 5 hours, but we'll see what feedback we get about this.

»
2 месяца назад, # |
Rev. 2   Проголосовать: нравится +26 Проголосовать: не нравится

Massive thanks to the organizers for a stellar event. The challenge was exhilarating, and we appreciate the opportunity for virtual participation and upsolving. Looking forward to more in the future

»
2 месяца назад, # |
  Проголосовать: нравится +29 Проголосовать: не нравится

Great contest! First time participating in an in-person contest in around four years and it was so much fun meeting people :)

»
2 месяца назад, # |
  Проголосовать: нравится +21 Проголосовать: не нравится

much fun

lemonade pog organizers orz

»
2 месяца назад, # |
  Проголосовать: нравится +24 Проголосовать: не нравится

We had a lot of fun organizing and hope you enjoyed it!

»
2 месяца назад, # |
  Проголосовать: нравится +26 Проголосовать: не нравится

very fun contest good food balloons are fun we need a smaller difficulty gap :notlikeblob:

»
2 месяца назад, # |
Rev. 3   Проголосовать: нравится +37 Проголосовать: не нравится

Very good problems, Especially B and J, recommend everyone to try.

I participated the contest all by myself, and ranked 13th finally. I solved 6 problems, almost 7 (finish E only 5 minutes after the contest end, and this solution get accepted at the gym). I am not sure if this result is good or not.

The only con of the contest is that it is too short. 3 hours is not enough, if we have 4 or 5 hours, this will be more close to real ICPC contest.

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

    As the author of J, you just validated my entire problemsetting career (after it was completely destroyed by Benq who solved G in 3 minutes 56 seconds in testing). Glad you liked the contest!

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

    Great job!

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

    can you help me how to solve B

    • »
      »
      »
      2 месяца назад, # ^ |
      Rev. 3   Проголосовать: нравится +25 Проголосовать: не нравится

      Use DP. Suppose the array B is 2,2,2,3,4,4, since the subarray in A may end at 0 or 1, so there the total states will be the product of each number frequency plus one in array B, and then times 2 for the last number (0 or 1). The example above shows the total number of states 4*2*3*2 = 48.

      Given the length of array A is at most 100, it can be approved that the number of states is very finite, since 100 can at most be formed by 13 distinct numbers. I don't know what is the maximum state possible, but my python solution O(nM) (M is the number of states) passed in 1300 ms.

»
2 месяца назад, # |
  Проголосовать: нравится +62 Проголосовать: не нравится

As an organizer give me contribution.

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

can anyone help me B

»
2 месяца назад, # |
  Проголосовать: нравится +15 Проголосовать: не нравится

I enjoyed eating 1e9+7 slices of pizza at BAPC.

»
2 месяца назад, # |
  Проголосовать: нравится +15 Проголосовать: не нравится

Grateful for the unforgettable Bay Area Programming Contest experience! Huge thanks to the organizers for seamlessly blending virtual participation with in-person excitement. Can't wait to tackle those problems again

»
2 месяца назад, # |
  Проголосовать: нравится +40 Проголосовать: не нравится

I would like to say this contest is amazing.

As a non-precollege contestant, I really enjoyed the contest.

T-shirts, contest area, food, problems, problems analysis. Everything were great.

The only pity is that I didn't win it :(

Congrats to the winners.

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

.

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

more bapc prizes when??

»
2 месяца назад, # |
  Проголосовать: нравится +25 Проголосовать: не нравится

what's the worst-case time complexity of a DP solution for B? I got confused analyzing that but I guessed it may pass and it did.

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

    The number of states in our model solution is exponential, but writing a DP to count the worst-case number of states gets us around $$$2 \cdot 10^5$$$. Code included here (which we also used to generate some of the tests):

    Code
»
2 месяца назад, # |
  Проголосовать: нравится +15 Проголосовать: не нравится

Actually I found the practice contest problems are interesting.

Is there a gym for trying the practice contest problems?

»
2 месяца назад, # |
  Проголосовать: нравится -10 Проголосовать: не нравится

Yo!

»
2 месяца назад, # |
  Проголосовать: нравится +15 Проголосовать: не нравится

Is there any written solutions? I'm pretty curious about the solution to problem A and C.

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

да

»
2 месяца назад, # |
  Проголосовать: нравится +20 Проголосовать: не нравится

On Problem C's editorial:

"While slower solutions did not pass directly, some contestants managed to solve the problem by precomputing the answers with a slower algorithm, then hardcoding them.".

Is this possible on Codeforces? I thought on doing that but the file size I got precomputing pass by far the 64KB limit on codeforces. I would need around $$$P \times 2 \times 10^4$$$ bytes. Where P is the precision I set for the answer, which I believe is around $$$15$$$. Is there some trick to reduce the file size?

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

    first of all, you are not required to store all the anwsers, for example, $$$n \le 500$$$ can be calculated online.

    secondly, it only cares about relative errors, so maybe you just set the lower precisions i think