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

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

I could access the editorial yesterday but right now when I clicked on the link, it gets redirected to the same page that was clicked from or the last page that my browser accessed. Is there any problem regarding the editorial? Or is it just an issue with the browser?

Полный текст и комментарии »

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

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

I guess I've tried really hard in this problem. But I don't know what silly mistake I am doing :(

Problem link: here

My code: here

I've even read all the discussions there. I've matched all the test cases mentioned there. I've tried so many different precisions, still WA :(

In my code, if I reduces the angle I am rotating with, precision increases whereas I get TLE, and vice versa. I am getting no way around it :( My idea is to binary search on the dividing line as I rotate the polygon. Please someone help. I have already tried it for nearly a whole day and I feel like banging my head right now :/

Thanks in advance...

Полный текст и комментарии »

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

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

Problem link: Here

So I came around this problem in a practice contest and after reading the statement I thought it would be simple. But when I noticed that the cuts were to be made totally in random places (not in integer portions), I was confused how to handle this kind of problem. Then I thought that in how many ways could I NOT make a polygon. Then I noticed that the largest side must be greater than or equal to half of the length of the stick. So if I slide this portion to a side, then all the k cuts must be made on the same side of the midpoint of the stick. Thus all possible choices become 2^k. But in how many ways I can place k cuts? I thought hard and I couldn't figure it out. Then I jumped to intuition and made some guesses and cross-checked with sample cases and the answer seemed to be 1-(k+1)/2^k. I implemented it and it was Accepted. But actually I don't have a clue why this worked. Later I found online that almost every solution was similar to mine. But no clear explanation was there. There is an explanation in CSDN blog but I didn't get it as it was in Chinese. And also, there are some explanations in mathStackExchange but they are for smaller cases like k=2 or 3. I was actually looking for a nice explanation for a general value of K. Please, is there anyone who can explain this to me in simple terms? I would be really grateful. Thanks in advance.

Полный текст и комментарии »

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

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

I am getting Runtime Error in this code but I am not getting why. I have checked quite a few times but couldn't find the reason. It'd be nice if someone helped :) Thanks in advance

Problem Link: Here My code: Here

Полный текст и комментарии »

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

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

Today I was trying the problem POJ 1201 and when I searched for a solution I found out that every solution uses the same approach as this link: here

The article is not written in clear English so I couldn't understand it properly. Would anyone please help me understanding the trick in here and explain in a nice and simpler way? I think it's a very nice trick to relate equations with graph. Please help me. Thanks in advance :)

Полный текст и комментарии »

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

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

I don't know why, but suddenly since yesterday Codeforces is loading very slowly in my Desktop and Laptop while other websites are just fine. I have to wait a while after I submit a code to get the verdict :( I refreshed my browser (chrome), cleared history, cache, cookies but nothing works. Any help please? :/

Полный текст и комментарии »

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