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

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

For the first time in the history of Indian ACM ICPC, a mirror contest will be hosted on CodeChef for Amritapuri regionals at http://www.codechef.com/AMR15MOS.

Time: 21st December 2015 (1000 hrs) to (1500 hrs). (Indian Standard Time — +5:30 GMT) — Check your Time zone.

Details: http://www.codechef.com/AMR15MOS/

Registration: It will be a team contest. You need to register your team here

New users please register here

The contest is open for all and those, who are interested, are requested to have a CodeChef userid, in order to participate.
  • Проголосовать: нравится
  • +24
  • Проголосовать: не нравится

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

You can view the live blog here and a live scoreboard here.

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

I can't submit problem AMLPALIN — "submit" button moves me to the very same page.

Also there are only 8 problems in online mirror, while there are 10 of them in live standings.

Thanks, it seems that now everything is fine.

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

404 error now , cant load page

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

How to solve Magical Matrix?

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

Who Won in the regionals ?

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

Is there going to be an editorial?

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

How to solve Similar Strings?

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

    DP[i][j] — number of pairs of similar strings where first string has length i and second string has length j.

    Create another table S[i][j] — number of pairs of similar string where first string has length at most i and second string has length at most j (it will be partial sum over DP table).

    Now you can say that DP[i][j]=S[i-1][j-1]*25+26 — you can either pick pair of equal strings where first string has length at most i-1 and second string has length at most j-1, and add same letter at the end of both strings (25 comes here because added letter should be different from last letter of these strings), or you can pick pair of strings consisting of single character (26 ways, depending on character you are going to use).

    After precomputing both tables you can answer query in O(1) — result will be simply S[N][N].

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

      This problem can also be solved using pure combinatorics.

      Notice that for each string of length 'n', the length of reduced string (say 'i') lies in the range from 1 to n (1 <= i <= n).

      Number of reduced strings of length 'i' = 26 * (25 ^ (i-1) ). (26 choices for the first character, and 25 for every other position, because every character has to be different from the last — follows from the definition of reduced string).

      Number of strings (of length 'n') reducing to a reduced-string of length 'i' is the same as distributing (n-i) identical objects among i boxes = C[(n-i)+i-1][i-1].

      Square this value (remember we have to count number of pair of such strings), multiply with 26 * (25 ^ (i-1)) and add to ans[n] for each 1 <= i <= n.

      Maintain an accumulated sum array, and you are good to go! Code for reference.

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

COPRIMES is a great problem :)!

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

Is problem cat and mouse a graph problem + binary search?

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

How to solve the problem COINS?

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

how to solve jump on buildings?? any hints??

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

    Between indices i (starting pt.) and j (2nd point on which we jumped) store the maximum no. of jumps you can make in dp[i][j].

    dp[i][j] = ( Hi>Hj ) ? ( 1+dp[j][i-1] ) : 0

    Answer for any index i will be max(dp[i][k] where k varies from 1 to n)

    To ensure sub state of dp has been calculated for calculating answer for any state ... compute the answer in ascending order of heights of building i.e first compute dp[i][j] for j=1 to n and i as the index of height of smallest building and so on !

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

Logic for approaching git problem ??

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

Any hints on how to solve the problem: Jump on Buildings. I have O(N^3) solution but that would timeout.

Thanks