Search found 120 matches

by Hisoka
Sun May 11, 2003 3:10 pm
Forum: Volume 2 (200-299)
Topic: 296 - Safebreaker
Replies: 13
Views: 3564

help 296

Hello........ I always got WA for this problem, but I cannot found where is my mistake. can you check my code ?? :cry: [c]/* @begin_of_source_code */ #include <stdio.h> #include <string.h> char cek_node[10000]; void proses(int number, int a, int b) { int i,j,k,yesa,yesb,cek[4]; int in[4],out[4]; for...
by Hisoka
Sun May 11, 2003 12:17 pm
Forum: Volume 2 (200-299)
Topic: 299 - Train Swapping
Replies: 81
Views: 11318

I know your program will produce 3 for this input. and the right output is 2.
this is that proses:

1 3 4 2 5

proses 1 : 1 3 2 4 5
proses 2 : 1 2 3 4 5

end of proses.

GOOD LUCK.......
by Hisoka
Sun May 11, 2003 7:54 am
Forum: Volume 2 (200-299)
Topic: 299 - Train Swapping
Replies: 81
Views: 11318

input

Code: Select all

1
5
1 3 4 2 5
output

Code: Select all

2
by Hisoka
Fri May 09, 2003 8:39 pm
Forum: Volume 1 (100-199)
Topic: 112 - Tree Summing
Replies: 137
Views: 14079

hello, I think you not understand about my previous post. I only give you my thanks, because you correction my sample I/O, and this is good. You never hurt me...

bye.... :D
by Hisoka
Fri May 09, 2003 5:23 pm
Forum: Volume 1 (100-199)
Topic: 112 - Tree Summing
Replies: 137
Views: 14079

Thanks for correction, for this problem, judge should not gave you a wrong input. this is my mistake.

bye....... :oops:
by Hisoka
Thu May 08, 2003 2:18 pm
Forum: Volume 1 (100-199)
Topic: 136 - Ugly Numbers
Replies: 156
Views: 18647

hello...

I think for test your algo correct or not, you can try to solve problem "humble number " http://acm.uva.es/p/v4/443.html both of them can be solved with same algorithm.
by Hisoka
Thu May 08, 2003 2:08 pm
Forum: Volume 100 (10000-10099)
Topic: 10018 - Reverse and Add
Replies: 169
Views: 18155

hello.... I'm sorry, I'm not familliar with java, I use C to solve this problem.

But I think the tricky input only if input is palindrome, you cannot output that. So there aren't output with count 0.

Maybe your mistake only in input or output, not your algo. Because some people WA because of that.
by Hisoka
Tue May 06, 2003 6:17 pm
Forum: Volume 100 (10000-10099)
Topic: 10018 - Reverse and Add
Replies: 169
Views: 18155

hello JiaYun....

My AC code give same result with your first I/O, not your second I/O

Code: Select all

4 9339
5 45254
3 6666
1 4
6 79497
1 4000000004
and when I submit my code when my answer like your second I/O, I got WA after new judge. :)
by Hisoka
Wed Apr 30, 2003 3:53 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 28793

yeah.... but it is only for input, but if the input is 2345678901, when this is a odd number under 2^32, so temp=3*temp+1, and this is greater than 2^32. for this you got WA, because if you use unsigned long you get negative result.
by Hisoka
Wed Apr 30, 2003 8:20 am
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 28793

hello......

I am not check your algo, but if you think your algo is right, you cannot use unsigned long for this problem, try to use double for temp variable, because temp can greater than 2^32. :wink:
by Hisoka
Wed Apr 30, 2003 8:14 am
Forum: Volume 104 (10400-10499)
Topic: 10484 - Divisibility of Factors
Replies: 39
Views: 18761

hello.....

maybe you wrong because of this.
there is negatif input in d.

Code: Select all

while(scanf("%d %d",&n,&d)==2)
by Hisoka
Tue Apr 29, 2003 8:31 pm
Forum: Volume 104 (10400-10499)
Topic: 10484 - Divisibility of Factors
Replies: 39
Views: 18761

Got AC now, I use long long instead of int. :oops:
by Hisoka
Tue Apr 29, 2003 8:20 pm
Forum: Volume 104 (10400-10499)
Topic: 10484 - Divisibility of Factors
Replies: 39
Views: 18761

10484 - Divisibility of Factors

Hello....

Can you give me more sample I/O ?
I always got WA about this problem..... :cry:

Thanks....
by Hisoka
Sun Apr 27, 2003 11:58 am
Forum: Volume 1 (100-199)
Topic: 112 - Tree Summing
Replies: 137
Views: 14079

Code: Select all

FILE *in;
in=fopen("C:/bc31/bin/a.txt","r");
why you want to do this ? :roll:
by Hisoka
Sun Apr 27, 2003 7:26 am
Forum: Volume 101 (10100-10199)
Topic: 10110 - Light, more light
Replies: 76
Views: 26220

hello......

Deddy one can use long long for this problem. but I don't know about that, because as far as I know sqrt only work in float or another float. you can get more explanation from help in your bc 3.1.

Code: Select all

double sqrt(double);

Go to advanced search