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

Автор radoslav11, история, 2 года назад, По-английски

We invite you to participate in CodeChef’s July Cook-Off, this Sunday, 3rd July , Rated for All. Time: 8:00 PM — 10:30 PM IST

Joining me on the problem setting panel are:

Also, if you have some original and engaging problem ideas, and you’re interested in them being used in CodeChef's contests, you can share them here. Hope to see you participating.

Good Luck!

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

»
2 года назад, # |
  Проголосовать: нравится +27 Проголосовать: не нравится

As a setter, I setted.

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

Is there something wrong about test case of segmentation fault (div2C)?

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

Nice, balanced contest. Thank you! Let me give some feedback for div1:

I only read (and solved) three problems, so will be a bit limited.

segfault: nice, easy problem. Mostly implementation, but requires a bit of thinking if you want to do it without pain.

LCM: A typical "random math" problem where you bruteforce the thing to see the pattern immediately without too much thinking. Not a big fan of those, but the pattern was somewhat surprising... Handling the case of all equal numbers in the sequence was super easy once I realized how to do it nicely, but took me ages to arrive at that conclusion. I liked how it wasn't "bruteforce then trivial", definitely a nice problem (although I was a bit annoyed at the start with "yet another bruteforce").

PQ: the idea is quite obvious, mostly an implementation exercise. I believe standard problems should appear in contests, so happy to see it. Even though it wasn't particularly brilliant.

Overall, I liked my first contest after a couple months. I was happy to see that only one of three problems I read were combinatorics, I'll consider coming more often :)

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

    Thanks for the feedback! Really appreciate it.

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

    I thought about Subsequence LCM like this:

    Let R[i] = a[i]%M where [l,r] is the range of indices of the subarray and r-l+1 = M.

    Case 1: Let LCM(M,a[i])-a[i] = k; if R[i] = 0 for some i in [l,r] then then LCM(a[i],M) = a[i] => LCM(a[i],M)-a[i] = k = 0 => all elements in the subarray must satisfy LCM(a[j],M)-a[j] = 0 => all elements in subarray are multiples of M

    Case 2: if there is no element for which R[i]=0 then by pigeonhole principle at least 2 elements in the subarray must have same remainder with M. Let a[i]%M = r and a[j]%M = r. GCD(M,a[i]) = GCD(M,r) and GCD(M,a[j]) = GCD(M,r) let the common gcd be g.

    Let us assume the subarray satisfies the condition LCM(M,a[i])-a[i] = LCM(M,a[j])-a[j] =>(a[i]*M)/g — a[i] = (a[j]*M)/g — a[j] => (M-g)*(a[i]-a[j]) = 0. Since we assumed remainder!=0 for all elements, M !=g =>a[i]=a[j] Hence all elements must be equal

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

Who approved div1 A and B :cringe:

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

Contest was nice. Also I have a small question to codechef admins.. In some codechef contests it shows which test cases are accepted and which are not. But today it was giving verdict only "accepted" or "Wrong answer" not showing the label of test cases which are accepted and which are not.

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

    The testfile-wise verdicts are shown in Subtask-type problems. Currently, Cook-Offs are the only contests which are not Subtask-type. So you can see the file-wise verdicts in all other contests, but not in Cook-Offs.

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

    It's because of the format of the contest. Generally cookoff are ICPC styled where you will just get the feedback (AC/WA/RE etc). In Lunchtime/starters/Long you see the verdict of each test case

»
2 года назад, # |
Rev. 2   Проголосовать: нравится +36 Проголосовать: не нравится

Thanks for the contest, I liked the problems. But, why so tight constraints for LCMSEQ?

»
2 года назад, # |
  Проголосовать: нравится +16 Проголосовать: не нравится

Congrats everyone ! Hope you liked my problem ( median pairs ), and to see you participating tomorrow in Codeforces round #804!

»
2 года назад, # |
  Проголосовать: нравится -8 Проголосовать: не нравится

Although this is completely irrelevant to the above post(apologies in advance) !! I needed a little help in this !!! I ran my code (https://codeforces.me/contest/1185/submission/162667577) across various other compilers and I am getting the expected output but for some reason, my code is not getting any output on the codeforces compiler, is it some compiler error or any other(extremely silly) error in my code?? A little help will be much appreciated!!

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

    Your pre_sum is out of bounds for i == 0 and .size() method returns an unsigned integer so you need to typecast it into integer.

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

Enjoyed the problemset although managed to solve only 3.Can someone provide a hint for STRBRK?

»
2 года назад, # |
  Проголосовать: нравится +29 Проголосовать: не нравится
Thanks for the contest. Brilliant problems A and B! (especially B)
»
2 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Any similar problem to PQ? (Link)

»
2 года назад, # |
Rev. 3   Проголосовать: нравится -6 Проголосовать: не нравится

CodeChef_admin Enjoyed the problems. Could solve first 2 in div1. The problems A and B were bruteforce and really liked implementing them. But the constraints were really tight for problem B.
Really enjoyed the contest. Hope we can have more Div 1 contests rather than lunchtime and Cook-off only.

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

It was a nice contest with great problems,Thanks.