pku 2461 Magic Bitstrings
Start by proving that in the square matrix (like the one, shown in the table in the problem statement),
the diagonal elements are always 0's if the first bit of the bitstring is 0.
這段話就可以構造出答案,猜出答案
The diagonal consists of the elements that are quadric residues modulo
n. There are (n-1)/2 such distinct elements. When we mark them as 0,
there are (n-1)/2 elements left. But a magic bitstring has equal number of 0's and 1's, so the remaining elements are 1.
這段話是證明猜想是對的,我還不太清楚
pku 2856 medals
仔細觀察,發現 j, k, l 太大了和 他們小的時候本質上沒什么區別,用n進制去理解,先假設 j, k, l 不相同那么只是需要三位數(n進制)就可枚舉出所有的情況 ,相同的時候用三位數(n進制)綽綽有余, 所以 用三位數就足夠枚舉了