- 博客(6)
- 资源 (1)
- 收藏
- 关注
原创 【UVALive】3029.City Game<C++>
#include<cstdio>#include<cstring>#include<iostream>using namespace std;char input[1001][1001],judge;int up[1001][1001],Left[1001][1001],Right[1001][1001];int main(){ int m,n,lnear,rnear,answe
2015-11-23 21:57:00 494
原创 【NOIP2015】求和<C++>
#include<cstdio>#include<cstring>using namespace std;int main(){ int n,m,cor; long sum=0; scanf("%d%d",&n,&m); long color[m+1][3][2],number[n+1],count[m+1][2]; memset(count,0,siz
2015-11-21 11:10:13 1949 1
原创 圈奶牛<计算几何><C++>
#include<iostream>#include<cstdio>#include<algorithm>#include<cmath>using namespace std;struct point{//x横坐标,y纵坐标. double x; double y;}p[10000],chosen[10000];bool cmp(point a,poin
2015-11-18 20:48:16 757
原创 糖果<DP><C++>
程序#include<cstdio>#include<cstring>using namespace std;int main(){ int n,k; scanf("%d%d",&n,&k); long f[n+1][k],a[n+1]; memset(f,0,sizeof(f)); for(int i=1;i<=n;i++) scanf
2015-11-04 22:06:27 625
原创 导弹拦截<DP><贪心><C++>
程序#include<cstdio>#include<cstring>using namespace std;int main(){ int i=-1,a[1001],f[1000],max,min,tot=0; memset(f,0,sizeof(f)); while(scanf("%d",&a[++i])==1) { max=f[i];
2015-11-02 22:00:49 3321
原创 求排列的逆序数<归并><C++>
程序#includeusing namespace std;void gb_b(int p[],int a[],int i,int j,int ans){ int e=(i+j)/2,q=i,w=0; do{ if(a[q]>a[e]) p[w++]=a[e++],ans++; else p[w++]=a[q++],p[w++]=a[e+
2015-11-02 21:02:42 1336
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人