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

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

First of all, apologies for a rather long absence, I was a bit tired after Round #694 (Div. 1) in which I got a significant positive rating change. It is always nice to see your work paying off, but let us get back to business.

Codeforces has an excellent archive of training contests, named gyms!

But it is very well possible that you do not know about the one beginner-friendly gym that I want to cover today, and the reason is that it is only available in Russian :|

I translated the statements to English for you, and recorded a problem walkthrough, in case you ever get stuck.

We will cover more gyms from this old but gold series by Saint Petersburg State University in the future, so stay tuned!

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

»
3 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

will you upload same for div 2 and div1 too ?

»
3 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

Thank you very much nskybytskyi

»
3 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

This is great, thanks for doing this! PD: Would be nice if the english PDF can be attached along with the russian one,

  • »
    »
    3 года назад, # ^ |
      Проголосовать: нравится +6 Проголосовать: не нравится

    I agree. I'll contact Mike when I have enough translated problemsets, but I don't want to waste too much of his time asking him to add each time separately.

    • »
      »
      »
      3 года назад, # ^ |
        Проголосовать: нравится +8 Проголосовать: не нравится

      I added it for you.

      you could have done it yourself, just turn coach mode on in the gym

      • »
        »
        »
        »
        3 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Oh, thank you! Maybe I was not around when this feature arrived and did not realize that I have such permissions.

»
3 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

nskybytskyi In problem J's input file format, I think you wanted to write $$$0 \leq n \leq 22$$$. BTW, Nice Effort :D

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Hi ! Can you please tell me the meaning of this in problem H "if any two of its elements differ at least two times." At least two times with respect to what ?

  • »
    »
    3 года назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    I had some trouble understanding it at first but I wrote a solution to verify my understanding.

    Here is a better statement:

    "We call a set of positive integers peaceful, if for every pair of elements in the set, the larger number in the pair is at least twice the value of the smaller one.
    
    We call the sum of the elements of the set its strength. Find the number of peaceful sets of a
    given strength."
    
    • »
      »
      »
      3 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Thanks :)

    • »
      »
      »
      3 года назад, # ^ |
      Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

      I know it is late but can you help me understand the sample test case? UPD: I got it and solved the problem but I think the problem statement should be "a set of non-negative integers..."

      • »
        »
        »
        »
        2 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        No, why? If we allow 0, then the number of ways gets multiplied by an extra factor of 2. You can check from the samples that this is not the case, i.e. 2 = 2 only, 2+0 is not allowed.

        Perhaps your confusion arises from the (false) belief that a set needs to have at least two elements. This is not the case either, one-element sets are totally fine.

    • »
      »
      »
      2 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Thank u bro. I was confused

»
3 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Why does your solution to the problem K work ? You said in the video that it is a well known formula. Where can I learn about it ?

Code
»
3 года назад, # |
Rev. 4   Проголосовать: нравится 0 Проголосовать: не нравится

Update:Solved.

I'm getting wa on 1 in problem J.I tried to run my code on cf's Ide.It worked.Can Anyone help me to find out my error?

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Problem-E [help]
please help what I am doing wrong??

Spoiler
»
2 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

can you please open the permission to see others solution @nskybytskyi (hope this work),it would be very helpful :D

  • »
    »
    2 года назад, # ^ |
      Проголосовать: нравится +9 Проголосовать: не нравится

    First, mentions work like [user:Beginner] : Beginner. Second, the decision not to show solutions is intentional, for educational purposes. Please take your time to solve the problems yourself, and refer to the video if necessary.

    If you really can't wrap your head around a problem after spending a good chunk of time on it, it may be better to just forget about it and come back after a longer period of time. Otherwise, you are unlikely to learn much from reading the code of others.

    • »
      »
      »
      2 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Sir The submission on J problem bad substrings is getting a Runtime Error on test 1 , I have cross-checked it with ur solution , getting same RE on test 1 ? Any fix..

      • »
        »
        »
        »
        2 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Problem J has been converted from file I/O to cin/cout, try resubmitting without freopen

»
22 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Why are some of the problems using standard input, but others using files? It just makes it more confusing...