Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

Bredor's blog

By Bredor, history, 12 days ago, translation, In English,

A. Lister to your Heart.

Idea
Answer

B. WA6.

Idea
Solution

C. Anime.

Idea
Solution

D. Distributed Computing.

Idea
Solution

E. Rating Recalculating.

Remark
Idea
Solution 1
Solution 2

F. Rudolph and Rhymes.

Idea
Solution 1
Solution 2
Remark

G. Noogies.

Remark 1
Remark 2
Idea 1
Idea 2
Idea 3
Solution 1

Due to restrictions on time and memory, the following solution could also pass:

Solution 2
 
 
 
 
  • Vote: I like it
  • +64
  • Vote: I do not like it

»
12 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Attention! Thank you for Editorial.

»
12 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Slight Typo Lister -> Listen

»
12 days ago, # |
  Vote: I like it +31 Vote: I do not like it

If anime is trash, then so am I...

»
12 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Hmm I passed E by direct computation (though I did not calculate $$$\frac{x^n}{n!}$$$ using pow but by multiplying $$$x$$$ $$$n$$$ times while dividing by $$$n$$$, $$$n-1$$$, ..., $$$1$$$ along the way).

»
11 days ago, # |
  Vote: I like it 0 Vote: I do not like it

In problem B Bredor will you please explain why long long gives wa? Reason behind giving overflow and why int don't overflow?

  • »
    »
    11 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Because Bredor is a troll

  • »
    »
    9 days ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    I think you did not get the question or the editorial correctly. So, the story is , a person implemented a program to get modular inverse of a number. Turns out he got wrong answer due to some mistake in his code. We have to guess the mistake and make the program with the mistake. The mistake our protagonist made is he used int instead of long long. Therefore, int overflows and not long long.

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

could anyone tell me what's my mistake in problem B

code

I used long long but wa6

  • »
    »
    8 days ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Problem is troll, and so are you!

    To cite rockstar2514

    the story is, a person implemented a program to get modular inverse of a number. Turns out he got wrong answer due to some mistake in his code. We have to guess the mistake and make the program with the mistake. The mistake our protagonist made is he used int instead of long long.

    Whole point of problem is troll — change long long to int and you will get "correct" solution.