摘要: //搜索//策略:先对横轴扩展,得可能解横轴区域,再验证纵轴。对纵轴相同操作 1 #include<stdio.h> 2 int save[310][310]; 3 int main () 4 { 5 int n,m; 6 while (scanf ("%d%d",&n,&m)!=EOF) 7 { 8 int t; 9 scanf ("%d",&t);10 int i,j,p;11 for (i=0;i<n;i++)12 for (j=0;j<m;j++)13 ... 阅读全文
posted @ 2012-03-11 19:02 ustc-acm 阅读(452) 评论(2) 推荐(0) 编辑
摘要: #include<stdio.h>#include<string.h>inline void swap(int & a,int & b){ int k=a; a=b; b=k;}const int N=50;long long binomial[N+1][N+1];void init(){ int i,j; for (i=0;i<=N;i++) { binomial[i][0]=binomial[i][i]=1; for (j=1;j<i;j++) { binomial[i][j]=binomi... 阅读全文
posted @ 2012-03-11 17:19 ustc-acm 阅读(417) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<math.h>#include<vector>#include<algorithm>using namespace std;inline double sqr(double x){ return x*x;}struct Point{ int x,y; int time; bool operator < (const Point & p2) const { return time<p2.time; } double operator ^ (const Point & p 阅读全文
posted @ 2012-03-11 17:19 ustc-acm 阅读(426) 评论(0) 推荐(0) 编辑