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.
這段話就可以構(gòu)造出答案,猜出答案
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
仔細(xì)觀察,發(fā)現(xiàn) j, k, l 太大了和 他們小的時候本質(zhì)上沒什么區(qū)別,用n進(jìn)制去理解,先假設(shè) j, k, l 不相同那么只是需要三位數(shù)(n進(jìn)制)就可枚舉出所有的情況 ,相同的時候用三位數(shù)(n進(jìn)制)綽綽有余, 所以 用三位數(shù)就足夠枚舉了
posted on 2009-02-25 22:49
wangzhihao 閱讀(345)
評論(0) 編輯 收藏 引用