BZOJ 1754: [Usaco2005 qua]Bull Math】的更多相关文章

Description Bulls are so much better at math than the cows. They can multiply huge integers together and get perfectly precise answers ... or so they say. Farmer John wonders if their answers are correct. Help him check the bulls' answers. Read in tw…
高精乘法板子 然而WA了两次也是没救了 #include<iostream> #include<cstdio> #include<cstring> using namespace std; const int N=105; int la,lb,lc,a[N],b[N],c[N],tot; char ch[N]; int main() { scanf("%s",ch+1); la=strlen(ch+1); for(int i=1;i<=la;i…
1754: [Usaco2005 qua]Bull Math Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 398  Solved: 242[Submit][Status][Discuss] Description Bulls are so much better at math than the cows. They can multiply huge integers together and get perfectly precise answ…
[算法]高精度乘法 #include<cstdio> #include<algorithm> #include<cstring> using namespace std; ; char s1[maxn],s2[maxn]; int a[maxn],b[maxn],c[maxn],lena,lenb,lenc; int main(){ scanf("%s%s",s1,s2); lena=strlen(s1);lenb=strlen(s2); ;i<…
1754: [Usaco2005 qua]Bull Math Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 374  Solved: 227[Submit][Status] Description Bulls are so much better at math than the cows. They can multiply huge integers together and get perfectly precise answers ... o…
原来强行转int可以避免四舍五入啊 #include<iostream> #include<cstdio> using namespace std; int r,y; double m; int main() { scanf("%d%lf%d",&r,&m,&y); double l=1.0+(double)r/100.0; for(int i=1;i<=y;i++) m*=l; printf("%d\n",(i…
--这可能是早年Pascal盛行的时候考排序的吧居然还是Glod-- #include<iostream> #include<cstdio> #include<algorithm> using namespace std; const int N=100005; int n,a[N]; int read() { int r=0,f=1; char p=getchar(); while(p>'9'||p<'0') { if(p=='-') f=-1; p=ge…
1755: [Usaco2005 qua]Bank Interest Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 187  Solved: 162[Submit][Status][Discuss] Description Farmer John made a profit last year! He would like to invest it well but wonders how much money he will make. He kn…
1.Link: http://poj.org/problem?id=2389 http://bailian.openjudge.cn/practice/2389/ 2.Content: Bull Math Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 13067   Accepted: 6736 Description Bulls are so much better at math than the cows. The…
1751: [Usaco2005 qua]Lake Counting Time Limit: 5 Sec  Memory Limit: 64 MB Submit: 168  Solved: 130 [Submit][Status] Description Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x…