BL7A.'s blog

By BL7A., history, 6 years ago, In English

original problem
(http://mirror.codeforces.com/contest/366/problem/E)
Here we have the complexity of a way to play a song is defined as the maximum of complexities of moving between adjacent pairs of the sequence. so we can redefine it as the maximum mxDIS(s[i], s[i+1]) for each i (0 <= i < n-1) where mxDIS(n, m) is the maximum (|x1-x2| + |y1-y2|) among all cells in which a[x1][y1] = n and a[x2][y2] = m.

I've already solved the original problem and now my question is:
How can we solve the problem if the complexity of a way to play a song is defined as the sum of complexities of moving between adjacent pairs? For example, the input: 3 3 3 3
1 2 3
1 2 3
1 2 3
2 1 3
should print the answer 7.
Explanation: we will start at cell (1, 2) and move to cell (3, 1) with complexity of 3(|1-3| + |2-1|) then to cell (1, 3) with complexity of 4(|3-1| + |1-3|) so the final answer is 4 + 3 = 7.
any help would be appreciated :D and thanks in advance.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By BL7A., history, 6 years ago, In English

Hi Codeforces!

As you all know, IOI'2018 is coming up soon, and teams are getting ready to travel to Japan.

Fortunately, I was able to make it this year to the team representing my country.

And to make it even better, the IOI this year will be held in any otaku's heaven : )

My excitement to go to japan had motivated me to train for long hours and do my best, changing the process that was tedious to me before to a very fun one : )

But unfortunately, we have had some trouble with the flight expenses. Even worse, the ministry of communication (which should have been the main sponsor) has just told us that they can’t afford our flight so most probably we won’t be able to find a sponsor. Therefore 2 members of our team would be traveling on their own budget. The other two (including me) won't be able to make it. So I was wondering if any of you have suggestions to what could we do to attend IOI 2018 on time?

Thanks in advance

UPD : we started a gofundme until we work sth out with the government (https://www.zoomaal.com/projects/65455)

UPD 2 : 1335$ already collected ... any tiny bit of help would be appreciated

UPD 3 : we reached half the goal and our second milestone ... 2060$ raised so far

UPD 4 : already 145% of the goal has been raised ... thanks to you, we are going to JAPAN ... that would have been impossible without ur help, thanks cf community.

Full text and comments »

  • Vote: I like it
  • +328
  • Vote: I do not like it

By BL7A., history, 6 years ago, In English

when I tried to open it, this message appeared : "Сервис недоступен. Идут технические работы." It was working just fine 3 or 4 hours ago ... is the problem from the site itself ? and if not how can I solve it?

Full text and comments »

  • Vote: I like it
  • +6
  • Vote: I do not like it

By BL7A., history, 7 years ago, In English

I was wondering why (on educational rounds) they only post the overall winners while winners from both division are posted separately on rated-for-div 2-only codeforces rounds.

Another question is: At first, Educational rounds were unrated for all divisions, now it is rated for div 2 only, are they planning to do rated-for-div 1 contests in the future ?

Full text and comments »

  • Vote: I like it
  • -9
  • Vote: I do not like it

By BL7A., history, 7 years ago, In English

These are two solutions for uva 784 — maze exploration problem :

https://paste.ubuntu.com/26433633/

https://paste.ubuntu.com/26433634/

the first one gets accepted but the second one does not although they are almost identical ? can anyone help with the explanation

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By BL7A., history, 7 years ago, In English

I was trying to solve 150A and I submitted a solution where I used a variable ( i ) in a loop :

for(int i=2; i*i<=n; i++)
    {
        while(n%i == 0)
        {
            n /= i;
            p[k++] = i;
        }
    }

and it got TLE in test 7

submission : 32983991

and when I changed the datatype of variable ( i ) to long long it got accepted.

submission : 32984272

can anyone help me with the reason...?

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it

By BL7A., history, 7 years ago, In English

An inquiry… Which is more effective? Digging deeper in each knowledge branch, as DP or graph theory, to be up to bar in it or working on diverse topics on the same time?
Other workable techniques are welcomed :D

Full text and comments »

  • Vote: I like it
  • +28
  • Vote: I do not like it