http://ace.delos.com/usacoprob2?a=ypoaBnzumP9&S=ariprog
分析:这题就是暴力搜索,剪枝,加了一个条件以后就过了。。没有再探寻更优解法。
代码如下:
#include <iostream>
#include <fstream>
#include <string.h>
#include <math.h>
#include <stdlib.h>
using namespace std;
struct PP
{
}ans[10001];
bool use[2*250*250+1]={0};
int find(int,int);
bool check(int,int,int);
int cmd(const void*,const void *);
int main()
{
}
int find(int n,int m)
{
}
bool check(int a,int b,int n)
{
}
int pow(int a,int b)
{
}
int cmd(const void* a,const void* b)
{
}