Search found 7 matches

by tonyk
Sat May 17, 2003 4:37 pm
Forum: Volume 5 (500-599)
Topic: 533 - Equation Solver
Replies: 6
Views: 2181

533 Equation Solver

I am so tired that I cannot find where the mistake is in my code.
Anyone give me some hints or e-mail me your corrcet code???
Many thanks.
ccwangtao@sohu.com
by tonyk
Thu May 08, 2003 10:51 am
Forum: Volume 5 (500-599)
Topic: 523 - Minimum Transport Cost
Replies: 44
Views: 9570

I did so!

I did so.
I read only the first line to calculate the value of n, and for the next n-1 line just input the integers. Then the next line input the values of the taxes.
by tonyk
Wed May 07, 2003 4:53 pm
Forum: Volume 5 (500-599)
Topic: 523 - Minimum Transport Cost
Replies: 44
Views: 9570

523 Minimum Transport Cost

Why I got Run Time Error?? Help!! [cpp]#include <iostream> #include <vector> using namespace std; int city[1024][1024], path[1024][1024], tax[1024]; vector<int> p; vector<int>::iterator pnt; void store_path(int i, int j) { int k=path [j]; if(k!=-1) { store_path(i,k); p.push_back(k); store_path(k,j);...
by tonyk
Wed May 07, 2003 10:26 am
Forum: Volume 5 (500-599)
Topic: 529 - Addition Chains
Replies: 32
Views: 3947

529 Addition Chains Help!!

I don't know how to slove this problem.
Anyone give me some hints??
Or give me a correct program(written in C or C++)
Many thanks!!
by tonyk
Wed May 07, 2003 8:28 am
Forum: Volume 5 (500-599)
Topic: 557 - Burger
Replies: 12
Views: 6280

What's wrong with my program?? Help!!

[cpp]#include <iostream> using namespace std; int main() { long double proba[50001]; int i,n,num; proba[0]=1; proba[1]=0.5; for(i=2;i<=500;i++) proba =proba[i-1]*(long double)(2*i-1)/(long double)(2*i); cin>>n; for(i=0;i<n;i++) { cin>>num; { cout.setf(ios::fixed); cout.precision(4); cout << 1-proba[...
by tonyk
Tue May 06, 2003 4:30 pm
Forum: Volume 5 (500-599)
Topic: 545 - Heads
Replies: 67
Views: 43551

I am exhaused!! Help!!

Who can email me a correct program?
Many thanks.
ccwangtao@sohu.com
by tonyk
Mon May 05, 2003 5:16 pm
Forum: Volume 5 (500-599)
Topic: 531 - Compromise
Replies: 73
Views: 25158

Why I still get Wrong Answer???

I have tried every method I can think of.
But still get wrong answer??

Why???
Who can give me some hints?

Go to advanced search