随笔分类 - ACM训练
摘要:题目描述:AK吧!少年 AK is an ACM competition finished all of the problems. AC This problem is one of the steps,so fight to AK。There are a number of graphics"_
阅读全文
摘要:题目描述:Alice and Bob One day, Alice asks Bob to play a game called “K-in-a-row”. There is a game board whose size is N*M. Alice plays first, and they al
阅读全文
摘要:题目描述:Satellite Photographs Farmer John purchased satellite photos of W x H pixels of his farm (1 <= W <= 80, 1 <= H <= 1000) and wishes to determine t
阅读全文
摘要:题目描述: Subset Sum Tags: 回溯 子集和问题的一个实例为〈 S,t 〉。其中,S={x1 ,x2 ,…, xn }是一个正整数的集合,c是一个正整数。子集和问题判定是否存在S的一个子集S1,使得x1+x2+...+xk=S, 其中x1,x2...xk属于集合S1。 对于给定的正整数
阅读全文
摘要:题目描述:Special array 输入n和m(20>=m>=n>0)求出所有满足以下方程的正整数数列 i1,i2,...,in,使i1+i2+...+in=m,且i1>=i2...>=in。例如:当n=4, m=8时,将得到如下5 个数列: 5 1 1 1 4 2 1 1 3 3 1 1 3 2
阅读全文