Search found 38 matches

by szymcio2001
Mon Apr 21, 2003 12:19 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 29833

Re: 371"Ackermann Functions "

SilVer DirectXer wrote: [cpp]cout<<"Between "<<input1<<" and "<<input2<<", "<<pos<<" generates the longest sequence of "<<max<<" values."<<endl;[/cpp]
You should write:
[cpp]
cout << "Between " << smaller << " and " << bigger << (...);
[/cpp]
by szymcio2001
Mon Apr 21, 2003 12:16 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 29833

29145 wrote:some one please help me too its givin wa.... :cry:
i didnt understand how to replace 3*n +1 to (3*n)/2+1 will it not affect the cycle length.....
I think that you don't consider that for 1 the length of the cycle is 3 and your output doesn't seem to be exactly identical as sample output.
by szymcio2001
Sun Mar 16, 2003 12:54 am
Forum: Other words
Topic: Pascal, C, C++ or Java ? !!!
Replies: 19
Views: 3779

Re: confirmation

C++ has some built functions like hastable, but it's slower. The inputs / outputs are easier than in C. I agree that the input / output is easier in C++. You can use streams which are very easy to use and what is the most important they are faster than functions from <stdio.h> There are also many o...
by szymcio2001
Fri Mar 14, 2003 3:12 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 43529

Re: I got Acepted

Your first code is too long to read it for me :-? but I had the similar error in my solution. I wrote then a program that generated a long, random inputs and I were running my program with those inputs. In this way I found the input that my program didn't solve (it gave a runtime error). If someone ...
by szymcio2001
Thu Mar 13, 2003 3:07 pm
Forum: Volume 1 (100-199)
Topic: 116 - Unidirectional TSP
Replies: 226
Views: 38039

Sorry, the output is of course:

Code: Select all

2 1 5 4
4
by szymcio2001
Thu Mar 13, 2003 3:04 pm
Forum: Volume 1 (100-199)
Topic: 116 - Unidirectional TSP
Replies: 226
Views: 38039

Rodrigo wrote:Same with me. I've covered all these points too, but I still get WA :/.
And so do I. But finally I found an input that my program didn't solve:

Code: Select all

input:
5 4
9 1 9 9
1 9 9 9
9 9 9 9
1 1 1 1
9 9 1 9

output:
2 1 4 5
4
Maybe it will help someone.
by szymcio2001
Mon Dec 09, 2002 4:13 pm
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 41543

You don't have to read all digits at the beginning of the program. You can read only two pairs of digits an then write one digit that you can calculate. For example first you read digits a1, b1 and then, in a loop, you read a2, b2 and calculate answer, as follows: [cpp] cin >> a2 >> b2; cout << ((a1...
by szymcio2001
Mon Dec 09, 2002 2:00 pm
Forum: Volume 100 (10000-10099)
Topic: 10025 - The ? 1 ? 2 ? ... ? n = k problem
Replies: 42
Views: 12084

Input Output
-----------------------------------------
1000000000 44723
43562436 9335
-235344 687
0 3
234387 685
------------------------------------------

This output is correct. If you get WA, maybe you don't consider the multiple input.

Go to advanced search