2012年9月9日

2012 ACM/ICPC Asia Regional Tianjin Online A very hard mathematic problem

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4282思路:枚举Y、Z ,二分X;View Code #include<stdio.h>__int64 num;int pd(__int64 z,__int64 y,__int64 a){ __int64 i,b,x; __int64 max=y-1,min=1; while(min<max) { x=(min+max)/2; b=x; for(i=1;i<z;i++) b*=x; if((b+a+x*y*z)>... 阅读全文

posted @ 2012-09-09 18:19 aigoruan 阅读(188) 评论(0) 推荐(0)

2012 ACM/ICPC Asia Regional Tianjin Online Intelligent IME

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4287思路:暴力View Code #include<stdio.h>#include<string>#include<iostream>#include<map>using namespace std;map<string,int>Map;char hash[150];char temp[5005][10];void inite(){ hash['a']=hash['b']=hash['c']= 阅读全文

posted @ 2012-09-09 18:16 aigoruan 阅读(199) 评论(0) 推荐(0)

2012 ACM/ICPC Asia Regional Tianjin Online Faulty Odometer

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4278思路:YYView Code #include<stdio.h>int ac[10]={0,1,2,2,3,4,5,6,7,7};int main(){ int a,n; while(scanf("%d",&a)!=EOF) { if(a==0) break; n=a; int i=1,s=0; while(a) { s+=ac[a%10]*i; i*=8; ... 阅读全文

posted @ 2012-09-09 18:13 aigoruan 阅读(154) 评论(0) 推荐(0)

2012 ACM/ICPC Asia Regional Tianjin Online Travel

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4284思路:预处理15个点之间的最短距离后暴力。View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>using namespace std;const int maxn = 105;const int inf = 1<<29;int dis[maxn][maxn];int h[maxn],d[maxn],c[maxn],vis[maxn];i 阅读全文

posted @ 2012-09-09 18:11 aigoruan 阅读(297) 评论(0) 推荐(0)

导航