### maroonrk's blog

By maroonrk, history, 4 weeks ago,

We will hold AtCoder Regular Contest 176.

The point values will be 400-400-700-700-800-1000.

We are looking forward to your participation!

• +61

 » 4 weeks ago, # |   +13 Hoping for the best ARC Round!
 » 4 weeks ago, # | ← Rev. 2 →   -19 Good luck to all who are competing!
 » 4 weeks ago, # |   +60 As a writer,I hope everyone who participates in this contest will enjoy it. Good luck!
 » 4 weeks ago, # |   0 Good Luck!Hope C!
 » 4 weeks ago, # | ← Rev. 2 →   +10 I didn't get the question right
 » 4 weeks ago, # |   +21 A was kinda tricky if you don't get the point :( I spent 30+ min on it :(
•  » » 4 weeks ago, # ^ |   0 what was the idea?
•  » » 4 weeks ago, # ^ |   0 can u please explain the solution of A. I am unable to get (b[i] — a[i] + n) % n , i cant understand it even after looking at the editorial
•  » » » 4 weeks ago, # ^ |   0 Maybe you can look at the following cases: One of the ways of n=6,m=1,(a,b)=[(1,3)]: ooxooo oooxoo ooooxo ooooox xooooo oxoooo --- One of the ways of n=6,m=2,(a,b)=[(1,3),(5,4)]: ooxooy yooxoo oyooxo ooyoox xooyoo oxooyo Where x and y means $1$ and o means $0$. You can divide them into $n$ sets that in each set, the elements has a same $(b_i-a_i)\bmod n$.
•  » » » » 3 weeks ago, # ^ |   0 Nice Explaination , thankyou so much
 » 4 weeks ago, # |   -36 Yet another pure math contest. I suck at math, so dislike.
 » 4 weeks ago, # |   0 can B be solved using bitmasks? I don't know about it but i reduced it to a point like this where quotient is $q = \frac {1000000....00_2} {111...1000...000_2}$but I was unable to solve it as I'm not good enough in bitmasks and stuff
 » 4 weeks ago, # |   0 what is the idea behind A?
 » 4 weeks ago, # |   +16 Does B have no testcase with $n = m-1$ and $k=m-1$? I realised this condition a few seconds after submitting, but to my surprise, my code got AC.
 » 4 weeks ago, # | ← Rev. 5 →   +16 Data of problem A is weak. As a result of me and my friends' verification, there is not a single piece of data that is $M \ne N < 2M$. And this is the evidence.For example, this code which I submitted during the contest must be wrong. It gives completely wrong answer with this input. # Input 3 2 1 1 2 2 # My Output (Wrong) 6 1 1 1 2 2 1 2 2 3 3 3 3 I sent a clarification an hour ago, and I'll update as soon as possible when I see any response. I hope that I can write up a code that will allow me to get Accepted after the data is strengthened.And I LOVE problem B. Very beautiful problem!
 » 4 weeks ago, # |   0 can anyone explain question b solution i did not understand
 » 4 weeks ago, # | ← Rev. 2 →   0 My First ARC got a 0pts but Rating+26, seems like it does need so many brainstroming instead of a number of algorithms at ahead problems.
 » 4 weeks ago, # |   0 Problem B is really a clever problem. I think I will never notice the case k=m-1 until I read the editorials. Hats off to the problem writers!
 » 4 weeks ago, # |   +24 Data of problem C is also weak
•  » » 4 weeks ago, # ^ |   +24 The Editorial of C says: If $v$ does not exist or \$X_v
•  » » » 3 weeks ago, # ^ |   +8 My code passed your case, but for this case: Input: 5 3 1 4 3 4 5 4 4 3 4 Output: 0 my code will give 4.I'm not sure whether this is common.
•  » » » » 3 weeks ago, # ^ |   +8 I hacked a lot people when I try to use their codes to check my wrong code. I'm so helpless. Who could help me?
 » 3 weeks ago, # | ← Rev. 5 →   0 Can someone explain the following code for problem A — 01 Matrix Again ? import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int m = scanner.nextInt(); int[] a = new int[m]; int[] b = new int[m]; for (int i = 0; i < m; i++) { a[i] = scanner.nextInt() - 1; b[i] = scanner.nextInt() - 1; } Set set = new HashSet<>(); for (int i = 0; i < m; i++) { set.add((b[i] - a[i] + n) % n); } for (int i = 0; i < n; i++) { if (set.size() == m) { break; } if (!set.contains(i)) { set.add(i); } } System.out.println(n * m); for (int p : set) { for (int i = 0; i < n; i++) { System.out.println((i + 1) + " " + ((i + p) % n + 1)); } } } } 
•  » » 3 weeks ago, # ^ | ← Rev. 2 →   0 There are total of n^2 elements in matrix so each (i-j)%n will occur atmost n times.(you can draw the matrix of (i-j)%n for some n to see it youself)since element are occurring on separate row and col we can assign 1 to such element that will increase the sum by n. How many times we need to do this? m times So at last we just need to select m remainders out of n and assign 1 to those positions.since some pairs are already given, we can just use remainder of those.I hope it helps...
 » 12 days ago, # |   0 can someone explain me the problem problem D in it ,I cant understand how transition states are made.