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

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

Hello , this year i qualified to the IOI , so to get ready for that i think the best way is participating in contests but as everybody see the ioi style contests are so rare , so i decided to add an old contest (USACO , COCI , COI , etc...) every three or four days and participate on it.
so i'm going to invite you to join me and participate on those contests .
i will add the contests to Hackerrank , and i will post the time and the description here on codeforces .

the first contest will be held on Apr/19/2016 at 18 MSK , the contest's duration is 4 hours and the problems are from USACO 2012 February Contest there will be four problems 2 gold and 2 silver .
the contest URL : https://www.hackerrank.com/ioi-training-contest-1
let us practice together :D
have fun and good luck :)
UPD: 15 minutes to go :) :D
UPD: the contest has finished :D
congratulation for :
1 — Radewoosh
2 — The_Watcher : Deemo
3 — Enchom : Enchom
4 — the_art_of_war
5 — IMAN_GH
6 — Gandook : INVWVZ
i think that i'm not appearing on the standings :v maybe because i'm who added the contest , my handle is superior1 and my score is 344.4 :D , https://www.hackerrank.com/contests/ioi-training-contest-1/compare/superior1/superior1

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

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

Awesome!

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

Why don't you add a full gold contest, silver problems are easy ? Does the contest supports partial scoring ?

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

    Some of the harder silver problems aren't easy, and are often equal to average gold problems. Also note that some of the easier gold problems are as difficult as the average silver problems. What division a problem is in is not an absolute measure of its difficulty :P

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

    good coders find the gold problems interesting for them .
    new coders find the silver problems interesting for them .
    so everybody gonna find interesting problems :D .
    and you will find a lot of useful ideas in the silver problems :3 :D
    yes it supports partial scoring , you will take 10 points for every accepted test .

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

have you seen my IOI online archive on contest.yandex.com/ioi? Check it out! Send a feedback message if you will see any mistakes

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

Cool idea! :)

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

Great thanks Dwik.

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

For those who aren't used to participate on hackerrank contests , i've made test contest you can find it here https://www.hackerrank.com/contests/ioi-training-contest-test-contest it's opened forever :D
try everything you want :D

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

OK :(

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

I want to tell you thanks because it was very good training for me and I realy liked tasks. And when the contest will finish I am for to discuss problems here.

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

    I look forward to an explanation for the coupons task...

    After thinking for over an hour, I gave up and looked up the original USACO site with the solution. It's a really nice solution, it sounds right, but I can't really prove it always leads to optimal results (and the editorial just says "this solution is clearly optimal" with very minimal reasoning).

    (Do wait until the end of the four hours before answering of course. :) I'm just asking now because I won't be here to post when it ends.)

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

It is over. Lets discuss.

Please share if you have links to editorials.

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

    how did you solve the first one ???

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

      I used a scan line. Sorted all points for x coordinate and iterate. If it is starting point I add new interval {Y1[i],Y2[i]} to set. If it is point of end I erase interval {Y1[i] ,Y2[i]} from set.

      And on every step I count the area of rectangles. I iterate through set and count area. If our pair <Y1[i] ,Y2[i] > we count the area of this rectangle and remember that we end on the value Y2[i] and we don't count the area of recrangle which is under Y2[i].

      Sorry for my english and not good editorials. Here is code. Maybe it will help you

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

      I used a technique called coordinate compression — basically, you put all X coordinates that appear in the data into a sorted array, then do the same for the Y coordinates. These coordinates define sort of an irregular "grid".

      If you take two adjacent X coordinates and two adjacent Y coordinates, they form a rectangle that is either completely covered with grass or completely free. This means that you can create a two dimensional bool array, storing whether each area is free or not.

      I started with the bool array full of "false". For each rectangle, I found the incides of its coordinates in the sorted coordinate list, then marked the corresponding elements of the bool array "true", adding their area to the sum if an element had been "false" before.

      My code here

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

How to solve Cow Coupons?

The best I could come up with was a O(n2·k) DP.

So, basically let DP(idx, todo, k) = minimum amount of money needed to choose todo elements from suffix [idx, n]. Answer will be maximum value of todo that is such that DP(0, todo, k) ≤ m. This will definitely TLE and only probably work for upto n = 500 or so. Can anyone provide clues to correct solution, or give some optimisations to this?

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

The cf handle of those you mentioned:

The_Watcher: Deemo

Gnadook: INVWVZ

Enchom: Enchom

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

My codes for Cow Coupons and Nearby Cows.
UPD: My solution for Cow Coupons is wrong. It fails the test provided by Deemo above. Very weak test data!
UPD2: No my solution is correct, I just copied the test wrong. It's the same as in the tutorial :D

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

"...an old contest (USACO , COCI , COI , etc...) every three or four days and participate on it..."

Any plans for the next one yet? I really screwed up this one, so I'd like a "rematch" soon :D