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

Автор HiCode2009, история, 2 года назад, По-английски

As we know,each fraction can be expressed as the sum of multiple unit fractions.

$$$\frac{p}{q}=\frac{1}{a_1}+\frac{1}{a_2}+...+\frac{1}{a_n}$$$

When we want to express a fraction as the sum of multiple unit fractions,we can use a greedy algorithm invented by Fibonacci,subtract the maximum unit fraction which is smaller than this fraction from this fraction.For example,$$$\frac{13}{14}=\frac{1}{2}+\frac{1}{3}+\frac{1}{11}+\frac{1}{231}$$$.

But when we want to find out the minimum value of $$$n$$$,things may be different.Can Fibonacci's greedy algorithm still work?

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

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

Автор HiCode2009, история, 2 года назад, По-английски

https://mirror.codeforces.com/contest/4/submission/174376175

My code:Check if sumtime is in $$$[minsum,maxsum]$$$,minsum is the sum of all the $$$mintime$$$ and maxsum is the sum of all the $$$maxtime$$$.Then greedy for the solution.

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

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

Автор HiCode2009, история, 2 года назад, По-английски

CF1108B

First submission

Second submission

Don't laugh at where I have defined the variables.I did that many months ago,code style unlike now.

We can use sort after changing the divisors' value,but the code which changes them to -14248 runs faster.It's 15ms faster than the other.Why is this happening?

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

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

Автор HiCode2009, история, 2 года назад, По-английски

I'm not good at English.Sometimes I even spend more than ten minutes reading the problems during contests,so I always have more penalties than others.

I know most of the English words in the problem,but it's difficult for me to understand what the whole text is saying.

I'm Chinese,and our country has its own language.Thus,not everyone need to learn English well.In my opinion,English is only a subject in our school.Now I'm a middle school student,I realized that I was wrong,but it's too late.When I am a primary school student,my classmates and I hope we can go to Nanjing Foreign Language School,which is the best middle school in our city.We worked hard for it,I know the meanings of many words,but for some of them I don't know how and where to use these words.I fill those blanks with my intuition.If my intuition was right then I got high score.

Being not good at English for many years make me hate English classes.I want to listen carefully to the teachers,but I cannot do it.My rating is dropping only because I can't understand the problems in the contests.

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

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

Автор HiCode2009, история, 2 года назад, По-английски

Ela's Fitness and the Luxury Number

https://mirror.codeforces.com/contest/1737/submission/176165907

You may say I have defined $$$lcge$$$ in the wrong place,but that's even worse:https://mirror.codeforces.com/contest/1737/submission/176166395

I think it should get Accepted,so some of the details are wrong?

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

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

Автор HiCode2009, история, 2 года назад, По-английски
  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится