摘要:
The Water Bowls 题意:给定20个01串(最终的状态),每个点变化时会影响左右点,问最终是20个0所需最少操作数? 水题。。直接修改增广矩阵即可;看来最优解不是用高斯消元(若是有Gauss消元0ms A的请留言~~),很多是0ms过的,我用了32ms; #include<iostrea 阅读全文
摘要:
SETI 题意:a0, a1, ...an-1 the function f (k) = ∑0<=i<=n-1aiki (mod p) always evaluates to values 0 <= f (k) <= 26 for 1 <= k <= n. 要求解的是a0, a1, ...an-1; 阅读全文
摘要:
Painter's Problem 题意:给一个n*n(1 <= n <= 15)具有初始颜色(颜色只有yellow&white两种,即01矩阵)的square染色,每次对一个方格染成黄色时,同时会把周围的方格也染成黄色。(这和1222的开关一样的关联关系)问最后可以将square全部染成黄色的最小 阅读全文
摘要:
Codeforces 55D Beautiful Number a positive integer number is beautiful if and only if it is divisible by each of its nonzero digits. Input The first l 阅读全文
摘要:
hdu 3652 B-number Problem Description A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string “13” 阅读全文