nik_exists's blog

By nik_exists, 3 hours ago, In English

Thank y'all so much for participating! Code will be added soon.

2259A - Moo Language School

Solution
Code
Difficulty
Quality

2259B - Minus Two

Hint 1
Hint 2
Solution
Code
Difficulty
Quality

2259C - 101

Hint 1
Hint 2
Solution
Code
Difficulty
Quality

2259D - MEX Multiset

Hint 1
Hint 2
Solution
Code
Difficulty
Quality

2259E - Treasure Map Destruction (Constructive Version)

Hint 1
Hint 2
Solution
Code
Difficulty
Quality

2259F - Binary Bubble Sort Inversions

Hint 1
Hint 2
Hint 3
Solution
Code
Difficulty
Quality

2259G - Index Removal

Hint 1
Hint 2
Solution
Code
Difficulty
Quality

2259H - Treasure Map Destruction (Counting Version)

Read the solution to problem E first

Hint 1
Hint 2
Hint 3
Solution
Code
Difficulty
Quality
  • Vote: I like it
  • +33
  • Vote: I do not like it

»
2 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by nik_exists (previous revision, new revision, compare).

»
2 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

good contest!

»
2 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

nice round thanks !

»
2 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

good problems, C was kind of annoying to implement

»
2 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Amazing round. Ty king

»
2 hours ago, hide # |
Rev. 4  
Vote: I like it +1 Vote: I do not like it

Maybe you are missing the space after [tutorial:2259B]?

It works for me:

Tutorial is loading...

nik_exists

»
2 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

W contest

»
2 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

2259E code ... cpp :skull:

»
2 hours ago, hide # |
Rev. 3  
Vote: I like it 0 Vote: I do not like it

The editorial isn't working because it doesn't use the announcement format /j

»
2 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

C is harder than D. But still orz round by nik_exists

»
2 hours ago, hide # |
 
Vote: I like it +1 Vote: I do not like it
#include "codeforces.h"
#include <chrono>
#include <vector>

using namespace std;
using namespace cf;

int main() {
    comment << "\nGreat contest!\n";
}

»
112 minutes ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

E can be solved with 2-SAT

  • »
    »
    108 minutes ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Can you explain more

  • »
    »
    71 minute(s) ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    i thought of 2SAT and then went for other solution (because i think we don't need 2SAT at all).

    Basically if a[i] == 0, then there should be treasure at position i. Otherwise if a[i] > 0, there should be a treasure at i — a[i] OR i + a[i]. So you just need to add a OR clause and let 2SAT solve it.

    • »
      »
      »
      69 minutes ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      if i — a[i] <= 0. Then i + a[i] MUST be treasure. if i + a[i] > n. Then i — a[i] MUST be treasure. otherwise either of them can be a treasure.

»
109 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

It Was a fun contest , but i got struck at E for almost the whole contest :-(

»
108 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I cared too much about my rating. That's why I wanted to solve C as fast as I could and made many silly mistakes

»
106 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Thanks for the contest! I enjoyed it

»
105 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

should i try to upsolve E? current rating is 1072 and max is 1100.

»
103 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

good cumtest

»
100 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Nice contest!

»
97 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

i dont know why i found it hard to understand E statement otherwise amazing round!

»
97 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Please elaborate more on the editorial of $$$E$$$.

  • »
    »
    63 minutes ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    let the given array be v and the final string be s for each v[i]>0 the closest island to it should be at position i-v[i] or i+v[i] if there is an island (v[j]=0) in the range ]i-v[i],i+v[i][ then that element j will be closer to v[i] which will be a contradiction so you should output -1 then for each -1 outside of the union of these ranges you can consider it as an island (set it to 1 in s and its valid given that it does'nt influence other elements) the -1 inside the union of the ranges will be set to 0 in the final string because they cant be set to 1 after that you need to check for every element i with v[i]>0 if there is an island in i-v[i] or i+v[i]

»
91 minute(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

The problems were amazing and realized I need to improve myself, java was kind of problematic at times

»
83 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Why does the system testing so long?

»
77 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

good contest, but G is too easy in Div.3

»
75 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I liked this round a lot, but B felt easier to implement than A xd. And G was really easy compared to E for me.

Good work!

»
74 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

E took me longer than F and almost had G on time but still it was a great round!

»
56 minutes ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Amazing contest, A-D was very easy.The jump from D to E was pretty big for a div 3.

Question F was really fun!

»
36 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

i got WA on test case 2 which was n=3 -1 1 1 i got answer as 1 0 0 Placing a treasure at island 1 (100) gives: Distance from island 1 to nearest treasure = 0. Distance from island 2 to nearest treasure = 1 (which is >=1). Distance from island 3 to nearest treasure = 2 (which is >=1). As question has clearly stated that ai means treasure is 'ATLEAST' distance away from ith island so my answer should be valid why jury's answer is -1

nik_exists explain this

  • »
    »
    31 minute(s) ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    As question has clearly stated that ai means treasure is 'ATLEAST' distance away

    this is not what the question says

    ai indicates the minimum number of islands that Bessie would need to travel through

    The minimum distance that Bessie would have to travel from Island 3 to reach a treasure is 2, not 1

    • »
      »
      »
      24 minutes ago, hide # ^ |
      Rev. 3  
      Vote: I like it 0 Vote: I do not like it

      so 'minimum' no of islands that bassie would need to travel from island 3 to reach treasure is should be 1 .. in my solution it is 2 which is (>=1) i think that meaning is also valid it should be accepted also please do consider this perpective as well.

      nik_exists

      • »
        »
        »
        »
        12 minutes ago, hide # ^ |
         
        Vote: I like it 0 Vote: I do not like it

        if the questions asks for the minimum and you give an answer greater than the minimum your answer is wrong

        • »
          »
          »
          »
          »
          7 minutes ago, hide # ^ |
          Rev. 3  
          Vote: I like it 0 Vote: I do not like it

          ai indicates the minimum number of islands that Bessie would need to travel through

          so Bessie has travlled minimum distance of ai so it should be valid .. i don't care about getting accepted but just think of this sentence and valid solution for it .. if we wanted that distance to be exactly ai we should have mentioned it that

          ai indicates the exact number of islands that Bessie would need to travel through to get treasure

          nik_exists

  • »
    »
    30 minutes ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    the distance of the nearest treasure from j should be exactly b[j] (if b[j] is not -1). not >=b[j]

»
12 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

AMAZING E and F! I had a lot of fun solving them :3

»
2 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

My contest discussion stream here for ABCDEFG