USACO
yizr_cnyali
这个作者很懒,什么都没留下…
展开
-
USACO1.1:ride
#includechar c[7],d[7];int main(){ freopen("ride.in","r",stdin); freopen("ride.out","w",stdout); int i,j,k,m=1,n=1,l,r; char a,b; scanf("%s",&c); scanf("%s",&d); for(i=0;i<=5;i++){ if原创 2016-01-27 17:16:58 · 2716 阅读 · 0 评论 -
USACO1.3:milk
#includeint m,n,i,j;int p1[5000],p2[5000];int sum,ans=0;int main(){ int max=0,k,r; freopen("milk.in","r",stdin); freopen("milk.out","w",stdout); scanf("%d%d",&n,&m); for(i=0;i<原创 2016-02-28 19:15:13 · 517 阅读 · 0 评论 -
USACO1.2:milk2
#includeint n;int wt[1000001]={0};int w1,w2,i,j,mw,max,mf=0,min=1000001,a1,a2; int main(){ freopen("milk2.in","r",stdin); freopen("milk2.out","w",stdout); scanf("%d",&n); max=0;min原创 2016-02-28 19:14:20 · 498 阅读 · 0 评论 -
USACO1.5:sprime
#include#includeint n;int k(int a){ int i,m; switch(a){ case 1:return 1;break; case 2:return 0;break;} m=(int)sqrt(a); for(i=2;i<=m;i++) if(a%i==0) return 1;原创 2016-02-28 19:13:07 · 536 阅读 · 0 评论 -
USACO1.3:skidesign
#includeint high[1001];int main(){ int i,j,k,m,n,answer=2147483647; freopen("skidesign.in","r",stdin); freopen("skidesign.out","w",stdout); scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d",&high原创 2016-02-28 19:11:27 · 539 阅读 · 0 评论 -
USACO1.1:gift1
#include#includechar name[14][14]={0},give[14]={0};int money[14]={0};char giver[14];int i,j,k,m,n,g,p,r;void bank(char x){ int i; scanf("%d%d",&g,&p); if(!g||!p) return; for(j=1;j<=n;j++){原创 2016-02-28 19:10:05 · 613 阅读 · 0 评论 -
USACO1.1:friday
#includeint pd(int x){ if(x%4==0||x%100==0 && x%400==0){ return 1; }else return 0;}int a[10],b[500];int main(){ //freopen("friday.in","r",stdin); //freopen("friday.out","w",stdout); int i,j原创 2016-02-27 11:16:32 · 704 阅读 · 0 评论 -
USACO题解索引
强大的USACO题解索引,未完待续……原创 2016-03-05 20:56:01 · 938 阅读 · 1 评论 -
USACO1.5:pprime
本文的打表参考于http://www.nocow.cn/index.php/Code:USACO/pprime/C%2B%2B原创 2016-03-08 21:30:57 · 748 阅读 · 0 评论 -
POJ 3259/USACO 2006 December Gold:Wormholes
#include #include #include #include const int maxn=510,inf=1000000000; int e,to[maxn*12],ne[maxn*12],be[maxn],w[maxn*12]; int d[maxn],p[maxn],ti[maxn],q[maxn*maxn]; int m,n,wx,f,l,原创 2016-01-31 16:35:18 · 3128 阅读 · 0 评论 -
USACO1.2:dualpal
#includeint b;int p(int x){ int i,j,m,k,n,sum=0,a[100]={},t; for(k=2;k<=10;++k) { n=x; t=0; m=1; while(n) a[++t]=n%k, n/=k; for(i=1,j=t;i<=j&&m;++i,--j) if(a原创 2016-02-27 12:09:04 · 817 阅读 · 0 评论