jaglike_makkar's blog

By jaglike_makkar, 13 months ago, In English

Hello Fellow Coders,

Warm and pleasant greetings from Coding Club, IIT Ropar.

With utmost zest, we want to announce that our club is organizing some exciting programming-driven events under our Annual Techno-Cultural Fest – ZEITGEIST. (zeitgeist.org.in)

The event details are as follows:

  1. COD-COM: A 3-stage coding tournament with prizes worth 30k. (Team event)
    Registration link: Unstop | Townscript
  2. Algo-Unlock: A 2-stage reverse coding-based event with prizes worth 16k. (Individual event)
    Registration link: Unstop | Townscript
  3. Code-Hunt: A single-stage treasure hunt-based event with prizes worth 27k. (Team event)
    Registration link: Unstop | Townscript

Important:

  1. The 1st Stage of COD-COM is in online mode on CodeChef on 16th March’23 from 8:00 PM to 10:15 PM IST. (Note: The contest will follow ICPC rules).

  2. The 1st Stage of Algo-Unlock is in online mode on Codeforces on 17th March’23 from 9:00 PM to 11:00 PM IST.

NOTE:

  • Further details & rulebooks can be found and downloaded through the registration links or through the official site of Zeitgeist (https://zeitgeist.org.in/).
  • Contest link will be shared with your registered email IDs. So, please make sure you register for the events.

Update:

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

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

Are there any prizes for online rounds?

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

The first round of COD-COM is clashing with the ICPC Kanpur-Mathura 2022 Qualifier Mock Round. Can you please reschedule.

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

    Why are you so concerned about Mock Round? I think you already know the platform, as well as the problems. We have a Mock round today too. One can attempt to know the platform well.

    These contests are a part of the fest. I suppose it wouldn't be easier for them to reschedule the contest this late.

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

      it's important for those participating for the first time in ICPC. you guys should think about it

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

        Read the comment carefully. One is supposed to attempt the Mock round to know the platform well. We have Mock rounds on two days, today as well as tomorrow. You can try today's round to know the platform well. You can attempt the practice problems available on the platform as well.

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

Where is link of the Contest-Link of COD-COM?

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

How to solve Reach at the Party (Hard Version)?
Also can you guys please open others submissions

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

    how to solve game of pwer and game of median?

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

      For Game of power we can do sorting. We can find for each monster how many times it will attack us and then find the damage dealt by it to us. We can then remove the k monsters with maximum damage and fight the other monster. If our health remains poistive then we can win else no.
      for median game we will only consider the values less than or equal to m. If the number of such values is less than ceil(n/2) then we can't make median equal to m. Else we will check among all these smaller values if we can make any of them equal to m by multiplying with k.

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

        Thats exactly what i did in game of power and i think i did the same thing in game of median as well not sure where i went wrong

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

    Hint — Binary Search

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

    As the array is circular consider the whole arrangement on a circle whose perimeter is sum of elements of array. So for each index 'i' as starting point(party house) the max distance will be for index 'j' which will be closest to its diametrically opposite point. You can find the index/point easily by maintaining prefix sum and using lower bound/binary search on it and hence it will logn per index. Total complexity will O(nlogn)

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

    You can solve it using binary search in O(nlogn). Go to each index and find out the max time taken by all others to reach that index using binary search.

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

Please turn on the submission for practice.

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

Please add all the questions in the practice section of codechef :)

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

Anyone, please share the approach for It Cost Zero. We tried using DSU on trees.

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

    I was able to AC with small to large merging. I think there exists simpler solutions with only dfs.

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

    no it was not needed. In my solution, I broke the tree at all the zero edges and for each of the trees i got i added to my answer the frequency of the most frequent weight in that tree, except for the tree whose whose root node was 1, for that tree you simply calculate the number of nodes which have cost zero. Not the very technical explanation but I hope you got the idea

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

Can anyone please give some hint regarding the MEX problem . thanks in advance

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

    Segment tree. If we want the mex to be i then there should be every number from 0 to i-2,i-1 should be absent and others can occur.

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

Can anyone tell me the logic for "Race to White"? I believe if B is present in the last then the answer is increased by 2 if not the answer is increased by 1 if B is present in the start or between the last and the start. If there is no W and there is B then the answer is -1.

Here is my code

void solve() {
	string s;
	cin >> s;
	int n = sz(s);
	int ans = 0;
        // starting from 0 till n-1(not including n-1)
	rep(i, 0, n - 1) {
		if (s[i] == 'B') ans++;
	}
	if (s[n - 1] == 'B') ans += 2;
	int fg = 0;
	rep(i, 0, n) {
		if (s[i] == 'W') {
			fg = 1;
			break;
		}
	}
	if (fg)
		cout << ans << nline;
	else cout << -1 << nline;
}

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

      Original:WBBWWBBWBBB

      Steps:

      WWBWWBBWBBB

      WWWWWBBWBBB

      WWWWWWBWBBB

      WWWWWWWWBBB

      WWWWWWWWWBB

      WWWWWWWWWWB

      WWWWWWWWWBW

      WWWWWWWWWWW

      Total steps 8

      My code is also giving 8 only

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

        first step is wrong, you converted WB to WW in one step

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

Will the ratings of codeforces be affected if we participate in Algo unlock?

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

    No. It is an unrated contest held in the Codeforces gym.

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

Nvm but the problem DP or GREEDY and this problem are exactly same

»
13 months ago, # |
Rev. 2   Vote: I like it +5 Vote: I do not like it
The Algo unlock contest is very good.
I first time give this type of contest and feel excited for more such type of contest to be held in future
Great Efforts
»
13 months ago, # |
  Vote: I like it 0 Vote: I do not like it

It was fun to solve Algo-Unlock contest. Not able to solve problem B, D & G. How to solve these?

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

    message me, i will send soln of B and D

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

      It is over now. I think now we can discuss the solutions here.

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

        ohh Then here we go.

        Solution for Question 2
        Solution for Question 4
  • »
    »
    13 months ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    B is simply a pattern base question.

    In D, it is simply the sum of the multiplication of the character's position in a string and the character's position in the English alphabet. Like in first tc (1*3)+(2*15)+(3*4)+(4*9)+(5*14)+(6*7)=93.

    In G, print the character ahead of 'a' by a distance of difference between first and last, second and second last, and so on the character of the string, like in the first test case difference between c and g is 4, so 'a'+4 = 5 which is 'e' character similarly difference between 'n' and 'o' is 1 so a+1=2 which is 'b' letter, and lastly difference between 'd' and 'i' is 5 so 'a'+5=6 which is 'f' so final string is ebf.

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

Thanks for participating in the contest and making it successful. We hope you’ve enjoyed the contests and will try to come up with more interesting rounds in future.

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

is there any prizes for this online round