zeyd1234's blog

By zeyd1234, 8 months ago, translation, In English

Hello again. Thank you for participating. I hope that you liked the problems. Sorry for the mistakes in constraints and statement. In other rounds, i will check all tasks twice, to don't allow that mistakes. There is an Editorial:

A — Petya and Car Counting

Solution
Implementation

B1 — Armstrong Numbers Count

Solution
Implementation

B2 — Armstrong Numbers Count(Harder Version)

Solution
Implementation

C — Active Users in Chat

Solution
Implementation
  • Vote: I like it
  • +15
  • Vote: I do not like it

»
8 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been translated by zeyd1234 (original revision, translated revision, compare)

»
8 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Problem C's editorial is broken, and binary search on problem B2 could also work

»
8 months ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

"This one is tricky, because you can't just brute-force. Instead, we can precompute! Because there are a small amount of Armstrong numbers, we can just find all of them by sacrificing our PC, and then get all Armstrong numbers, put it in array and done!"

So, this method was generally used to deal with highly composite numbers i.e. putting them in a file (not brute force, but using e.g. OEIS/etc...). But... how about Armstrong numbers? Would there be some branch and bound solutions that could generate them fast? I believe there is one just like for highly composite numbers.

»
57 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Problem B2 implementation is bad