O--O's blog

By O--O, 13 months ago, In English

Hello, Codeforces!!

We are happy to invite you to TheForces Round #10 (TEN-Forces), which will take place on Apr/10/2023 18:05 (Moscow time)

Please don't forget the time.

You will have 2 hours to solve 6 problems.

Registration is open now.

Discord Server (600+ people)

Contests' archive

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

| Write comment?
»
13 months ago, # |
  Vote: I like it +17 Vote: I do not like it

As a tester, Give me contribution!

»
13 months ago, # |
  Vote: I like it +7 Vote: I do not like it

nice

»
13 months ago, # |
  Vote: I like it +25 Vote: I do not like it

Make it rated

»
13 months ago, # |
  Vote: I like it +12 Vote: I do not like it

exciting

»
13 months ago, # |
  Vote: I like it +29 Vote: I do not like it

"As a tester, Give me contribution!" I really liked some of the problems a lot. Hope you guys enjoy!

»
13 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Registration is open!

»
13 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Are the questions sorted in increasing order of difficulty?

»
13 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Contest was good :)
All the problems were nicely framed but I liked E more :3

»
13 months ago, # |
  Vote: I like it +8 Vote: I do not like it

may anyone tell me the logic of the solution of problem E please ??

i saw the solution but still can't understand.

  • »
    »
    13 months ago, # ^ |
      Vote: I like it +19 Vote: I do not like it

    Let me try..

    • If you observe that last digit of fibbonacci series gets repeated after each interval of $$$60$$$.
    • To find the last digit of $$$a^b$$$ we can use the fact that mentioned here.

    By above mentioned two facts we can solve this problem easily.

    • »
      »
      »
      13 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      hey can you please clear one doubt in F. i saw your code. i think f denotes whether b is bigger than a or not and t checks that b must be less than n. now,

      if (t){
              if ((n >> i) & 1){
                  ans += rec(i - 1, f, 0); // 00
                  ans += rec(i - 1, f, 1); // 11
                  if (f) ans += rec(i - 1, 0, 1); // this is what you are doing
                  else ans += 2 * rec(i - 1, 0, 1); 
              }else ans += rec(i - 1, f, t);
          }
      

      and this is what my mind says

      if (t){
              if ((n >> i) & 1){
                  ans += rec(i - 1, f, 0); // 00
                  ans += rec(i - 1, f, 1); // 11
                  if (f) ans += rec(i - 1, 0, 1); // 01
                  else ans += rec(i - 1, 0, 1) + rec(i-1, 0, 0);//this is what my mind says
      // because if we put 1 in a and 0 in b then t should be zero because b became less than n.
              }else ans += rec(i - 1, f, t);
          }
      

      Do you understand what i am saying?

      • »
        »
        »
        »
        13 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Actually, you got it incorrect.

        $$$f$$$ — denotes whether $$$a$$$ is equal to $$$b$$$ or not (a tight condition).
        $$$t$$$ — denotes whether $$$(a | b)$$$ is equal to $$$n$$$ or not (another tight condition).

        Hopefully now that be clear if not you may ask ...

        • »
          »
          »
          »
          »
          13 months ago, # ^ |
          Rev. 3   Vote: I like it 0 Vote: I do not like it

          if $$$f$$$ just checks whether $$$a$$$ is equal to $$$b$$$ or not than $$$a$$$ can be greater than $$$b$$$. but in the question $$$a$$$ must be less than or equal to $$$b$$$. what am i missing?

          Edit:- maybe when a becomes greater than b, we consider a as b and b as a.

          • »
            »
            »
            »
            »
            »
            13 months ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            No, $$$a$$$ can't be more than $$$b$$$. I assured it already.

            You may see if $$$f$$$ is true I'm going with $$$01$$$ case only not in $$$10$$$.

»
13 months ago, # |
  Vote: I like it +10 Vote: I do not like it

We need a rating!

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

haha, when i tried to register for discord i am limited cuz age issues:(