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

Автор jaglike_makkar, 20 месяцев назад, По-английски

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:

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

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

Are there any prizes for online rounds?

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

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

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

    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.

    • »
      »
      »
      20 месяцев назад, # ^ |
        Проголосовать: нравится -11 Проголосовать: не нравится

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

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

        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.

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

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

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

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

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

    how to solve game of pwer and game of median?

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

      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.

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

        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

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

    Hint — Binary Search

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

    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)

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

    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.

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

Please turn on the submission for practice.

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

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

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

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

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

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

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

    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

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

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

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

    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.

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

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;
}

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

      Original:WBBWWBBWBBB

      Steps:

      WWBWWBBWBBB

      WWWWWBBWBBB

      WWWWWWBWBBB

      WWWWWWWWBBB

      WWWWWWWWWBB

      WWWWWWWWWWB

      WWWWWWWWWBW

      WWWWWWWWWWW

      Total steps 8

      My code is also giving 8 only

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

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

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

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

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

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

»
20 месяцев назад, # |
Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится
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
»
20 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

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

    message me, i will send soln of B and D

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

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

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

        ohh Then here we go.

        Solution for Question 2
        Solution for Question 4
  • »
    »
    20 месяцев назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    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.

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

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.

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

is there any prizes for this online round