摘要: POJ:http://www.poj.orgZJU:http://acm.zju.edu.cnUSACO:http://ace.delos.com/usacogateUVa:http://uva.onlinejudge.org/Topcoder:http://www.topcoder.com/ 阅读全文
posted @ 2011-02-05 22:14 Faircoala 阅读(135) 评论(0) 推荐(0) 编辑
摘要: #include int marbles[6]; int split(int num); int main() { int i,t,c,sum; c = 1; while(1) { sum = 0; for(i=0; i=0; i--) { // 先试大的效率高 if(num >= i+1 && marbles[i]) { marbles[i]--; ... 阅读全文
posted @ 2011-02-05 21:14 Faircoala 阅读(234) 评论(0) 推荐(0) 编辑
摘要: /* * 将down交换左右,等价成up, * 记录非even情况下两侧的字母出现次数和所有字母总出现次数。 * 结果为coins[i][LEFT]或coins[i][RIGHT]等于3-even, * 且coins[i][ALL]等于3-even的字母 */ #include #include #define LEFT 0 #define RIGHT 1 #define AL... 阅读全文
posted @ 2011-02-05 18:50 Faircoala 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 原题只有13种输入,算出每种的结果再写个查表程序。查表: 阅读全文
posted @ 2011-02-05 00:13 Faircoala 阅读(221) 评论(0) 推荐(0) 编辑