agrim07's blog

By agrim07, 11 months ago, In English

Greetings CodeForces!

GeekHaven — the Technical Club of IIIT Allahabad is excited to invite you to CodeGuerra, a flagship event within OpenCode — a month-long open-source event hosted by students at IIIT Allahabad.

The contest will take place on December 22, 2023, at 20:00 IST.

Many thanks to all the people who made this round possible:

You will be given 7 problems and 2 hours and 15 minutes to solve them. The difficulty of the round will closely resemble Div. 3, 4 rounds.

We hope you will enjoy the contest!

UPD: Registration is open now

UPD: Editorial is out

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

»
11 months ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

22

»
11 months ago, # |
  Vote: I like it +6 Vote: I do not like it

very much excited, #IIITA

»
11 months ago, # |
  Vote: I like it +6 Vote: I do not like it

Excited for this one!! agrim07 thanks for inviting.

»
11 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Lets go !!

»
11 months ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it

Looking forward!!

»
11 months ago, # |
  Vote: I like it +6 Vote: I do not like it

Congratulations! I Hope there will be many contests ahead organised by this team☺️

»
11 months ago, # |
Rev. 6   Vote: I like it +6 Vote: I do not like it

Looking forward to giving this contest!

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

Is this rated or just?

»
11 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Excited !!

»
11 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Excited !!

»
11 months ago, # |
  Vote: I like it +5 Vote: I do not like it

As a tester i think all of the problems are very nice and you will definitely learn something from all of them .

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

very excited for this :D

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

:tamil:

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

pvtr aiyo

»
11 months ago, # |
Rev. 4   Vote: I like it 0 Vote: I do not like it

Excited and looking forward to give the contest

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

Excited

»
11 months ago, # |
  Vote: I like it +3 Vote: I do not like it

any registration link?

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

    You will be able to register 6 hours before the start of the contest using this link

»
11 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Thanks for inviting us. Hopefull to get a good rank

»
11 months ago, # |
  Vote: I like it +9 Vote: I do not like it

so there are no prizes whatsoever ?

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

Excited

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

Excited!!!

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

excited for this contest

»
11 months ago, # |
  Vote: I like it +4 Vote: I do not like it

enjoyed solving problems A to E , thanks for the contest

»
11 months ago, # |
  Vote: I like it +3 Vote: I do not like it

what was the approach for problem C ??

  • »
    »
    11 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    Spoiler
  • »
    »
    11 months ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    for f(i) = f(i — 1) + f(i — 2) we can see that, whenever i is odd, the parity of f(i) is odd, just try out some examples you will figure it out.

    Now for g(i) = count(f(i), 1) — count(f(i), 0), we can see that whenever i % 3 = 2, the parity of g(i) is even, else parity of g(i) is odd, try out some examples.

    It is also easy to prove the above pattern.

    void solve() {
        int n; cin >> n;
        if(n % 3 == 2) {
            if(n & 1) cout << "NO\n";
            else cout << "YES\n";
        } else {
            if(n & 1) cout << "YES\n";
            else cout << "NO\n";
        }
    }
    

    Hope it helps.

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

    Numbers that are congruent to {1, 2, 3} mod 6

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

What would be the approach for the problem E i tried binary search + two pointers but not get it can someone tell

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

I was getting wrong answer on test2 for D.

My approach: Obtain a new string by adding the substrings from index (0 to l-1) and (r to last-1). Now check if str is a substring of this new string.

Here is my code , can you help where i am wrong...

My Code
  • »
    »
    11 months ago, # ^ |
    Rev. 2   Vote: I like it +3 Vote: I do not like it

    Please read the question one more time. We need to search if there is subsequence of string s(0..l-1) + s(r + 1, ... n — 1), equals to str, not substring of s(0..l-1) + s(r + 1, ... n — 1).