yash.15296's blog

By yash.15296, 10 years ago, In English

Before start(t<0): " If I manage to solve even one problem, then I will get into Div 1 "

0:05 : After reading first problem," easy! "

0:15 : Then found the relation phi^n=phi^(n-1)+phi^(n-2)

0:20 : Then found that series grows fibonacci to 10^5 terms.

Reminder : Dont submit in this contest. Rating will free fall. continue!

0:35 : " ... maybe that's why this problem is 1000 and not 500" Move on to problem 2!

0:45 : "i am not able to understand the question".

Then I checked the standings and found that tourist had solved the third and not second.

"Probably 2nd is also hard. Lets see the third problem"

0:55 : "Third one is algorithm based (probably dp+greedy+...). I should focus on second"

1:15 : "Finally I think of a 'solution': find the lighter table and move it to maximum element of heavier table and then see for remaining elements on heavy table whether they would go to max element or invite the other table. I believe this is a very good solution and this will surely pass!"

1:25 : wrong answer on pretest 4

"That was why they warned! Dont try to be too smart..." Now I had fallen into trap!

1:35 : "Probably the numbers would have overflowed. This is the only problem that can be solved. So lets try to write it in python!"

I had never done more than hello world in python, but had seen a few codes!

With great difficulty I managed to translate it in 40 minutes after scores of runtime errors during the random inputs. (Too bad that only error in py is runtime error, even if it is because of using an undeclared variable)

2:15 : Again the same result! wrong answer on pretest 6.

Now I did not try to find the error. I had just translated a code from c++ to python!

"Okay I am not getting the problem B but i know that overflow is the problem in A. So I will try to get the pretests passed and then hack!!"

2:25 : Pretest failed. wrong answer on pretest 9.

"No problem! Lets write it in python!!" (Maybe it will treat large fibonacci numbers as normal ones)

This time I translated in 20 minutes!

2:45 : runtime error on pretest 4

On first day of python, I guess it is hard to find the cause of runtime errors, especially when you dont know the case causing it. I had no time left to continue this sorry tale and finally decided to stop it.

break;

After contest (t>3:00):

Next day I checked my submissions. Runtime error was on 0 0 input. I felt that trivial correction would give me AC. I got TLE.

...

[excuse]

"Probably that warning ruined the confidence for this contest."

[/excuse]

...

[optimism]

"OK. Does not matter. Keep working. Future would be better!(hopefully)"

"This contest was not meant for me. At least I stood up and tried my best (nearly)"

At least I had learnt the basic python syntax quite fast!

[/optimism]

Thats it for now! ...

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

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Well I would also like to know that what was the error in my logic for problem B.

My submissions: 7418316 for c++, 7419775 for python.

Also please provide good 'editorials' / 'link to editorials' for the contest, especially first three problems.

  • »
    »
    10 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    That solution is actually a edit distance of 2 of being correct: 7428200

    Another possibility (other than fixing the if condition) would be to calculate both options and then take min in the end.

»
10 years ago, # |
  Vote: I like it +41 Vote: I do not like it

1.15 — 1.25

»
10 years ago, # |
  Vote: I like it +3 Vote: I do not like it
  1. High-rated coders such as tourist usually solve hard problem before easier one (as hard problem loses more points per minute than easy). In this case he solved C before B.
  2. If you aren't good at a programming languauge, I think you shouldn't use it during contests
  • »
    »
    10 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    If C is 1500 and A is 500 the rule is that:

    Let t(C) = time to solve C, t(A) = time to solve A. If t(C) <= 3*t(A), then solve C before A.

    So, ideal strategy is, at first few minutes of the contest, read all problems, instantly estimate time to write solution for each problem, then solve them in order based on the above rule.

    • »
      »
      »
      10 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Thanks. I agree. Its a greedy solution!

      In this context he did q1 and q3 but not q2, that's why...

      I had also solved q2, just that silly typo :( and i felt i missed some corner case. (i did not see that code again till told above!)