Search found 51 matches

by zsepi
Tue Jun 17, 2003 1:51 am
Forum: Volume 102 (10200-10299)
Topic: 10220 - I Love Big Numbers !
Replies: 18
Views: 7657

10220 wa confused

i honestly don't know what could be wrong with my solution - i pregenerate the factorials (0! -> 1000! - not even stripping the zeros from the end), calculate the sums of the digits, the program runs in time (less than a second), but still it's wa.... there cannot be tricky cases, the standard input...
by zsepi
Wed Feb 26, 2003 4:42 am
Forum: C
Topic: Array size limit in C???
Replies: 5
Views: 3430

However, you may want to think about whether you actually need storage for MX*MX = 25000000 edges in this problem. thanx for the input, I know that I would only need to store MX-1 edge - but I tried to be lazy and not bother with a seperate edge structure. However, thanx for the lesson, I really di...
by zsepi
Wed Feb 26, 2003 12:06 am
Forum: Volume 104 (10400-10499)
Topic: 10459 - The Tree Root
Replies: 30
Views: 10353

10459 - The Tree Root

I believe it's more of a C language problem than algorithm, but if you've done this problem, you might be able to help me.

http://acm.uva.es/board/viewtopic.php?t=2415&highlight=

thanx
by zsepi
Tue Feb 25, 2003 11:53 pm
Forum: C
Topic: Array size limit in C???
Replies: 5
Views: 3430

Array size limit in C???

hi, I encountered this problem while trying to solve problem 10459. The description says that the maximum number of nodes is 5000, and that's what gets me into trouble. Here are all the variables I use: [c]#include <stdio.h> #define MX 5000 struct _node { int id,out,cost; struct _node *adj[MX]; }; m...
by zsepi
Tue Feb 18, 2003 9:36 am
Forum: Volume 4 (400-499)
Topic: 455 - Periodic Strings
Replies: 73
Views: 17148

wonder what's wrong here

hello all, I'm wondering why I got stuck on this problem... Is there some fancy input I don't handle quite right or I don't handle the multiple input well enough? all comments are appreciated [c]#include <stdio.h> #include <string.h> #define MX 81 int comp(char *what,char *where,int l) { int i=0; wh...
by zsepi
Sun Feb 16, 2003 9:01 pm
Forum: Volume 104 (10400-10499)
Topic: 10450 - World Cup Noise
Replies: 42
Views: 20093

thanx a lot guys,
I guess I'll just borrow a combinatorics book from someone and read through that - I'm just a freshman and combinatorics is next semester for me....

thanx again!
by zsepi
Sun Feb 16, 2003 4:00 am
Forum: Volume 104 (10400-10499)
Topic: 10450 - World Cup Noise
Replies: 42
Views: 20093

why fibonacci?

hei,
I spent some time on the problem and I just couldn't figure out how to solve it, but after looking at this thread, it seems that it is using the fibonacci numbers - could someone explain me why or just recommend some book/website? thanx a lot.
by zsepi
Fri Feb 14, 2003 10:47 pm
Forum: Volume 104 (10400-10499)
Topic: 10442 - Basic
Replies: 9
Views: 4904

thanks, though I just feel even more confused - I thought I got the rules, but it seems I did not in the standard input, the answer for the case 2#101##123# is yes - why? isn't there supposed to be only one number per line? or can you join additional number in the form _number_ (base#digits#)#_numbe...
by zsepi
Fri Feb 14, 2003 7:01 pm
Forum: Volume 104 (10400-10499)
Topic: 10442 - Basic
Replies: 9
Views: 4904

understanding of the problem

just a question, which I hope would clarify the problem (donno if it's just me, but I am confused by the description of the problem): what should be the output for the following input? 3 123##2#01001# 10#456##3#1210# 9#456##2#1210# my guess would be yes yes no let me know if I am right or wrong plea...
by zsepi
Thu Jan 23, 2003 9:35 am
Forum: Volume 101 (10100-10199)
Topic: 10179 - Irreducible Basic Fractions
Replies: 28
Views: 9836

10179 - algorithm

I just would like to ask someone if I am going on the right track or not... First I figure out if the denominator is prime or not. If it is, the output should be n-1, right? (by the way, what should be the output for n=1? 0 or 1?) Otherwise, I get all the primes, smaller than n^0.5, which divide n a...
by zsepi
Sat Jan 18, 2003 1:34 am
Forum: Volume 104 (10400-10499)
Topic: 10423 - Peter Takes a Tramway
Replies: 7
Views: 2689

anupam, I got AC - it is a real frustrating problem! Once I had a physics teacher and noone ever could score 100% on his tests, 'coz he would trick us... for instance, if in class he gave us all data in meters, then he would change it to centimeter in the test or something like that... You just need...
by zsepi
Fri Jan 17, 2003 9:23 am
Forum: Volume 104 (10400-10499)
Topic: 10419 - Sum-up the Primes
Replies: 51
Views: 17024

pls, could somebody help me now that the judge is judging correctly? I keep on getting TLE, though I dinamically store the results from previous calculations and limit the obviously impossible cases (when the value of t is less than 4). I have a feeling that I might not deel correctly with the input...
by zsepi
Fri Jan 17, 2003 12:43 am
Forum: C
Topic: Quick Sort
Replies: 6
Views: 3090

go to cplusplus.com/ref and check out what it has about it... what you need to do when you write your compare function is to cast the parameters to the type you use and then make your comparison...
by zsepi
Fri Jan 17, 2003 12:41 am
Forum: Other words
Topic: how can we join the online contest?
Replies: 1
Views: 784

if it is apublic contest, you just go to the contest site and read through the rules there... after the contest started, you click on the running contest link then on the problemset one nad you'll get the problems. you submit exactly the same way you would normally, except that instead of the proble...
by zsepi
Wed Jan 15, 2003 11:42 am
Forum: Volume 101 (10100-10199)
Topic: 10106 - Product
Replies: 98
Views: 27466

Re: 10106 product

route wrote:any tricky inputs for this question ?
hmm, let's see... have you tried multiplying with zero? and what's the upper limit for the numbers you can deal with? I got AC on it and I prepared to deal with any number less than 10^1000... maybe you can't use long long and those kinda things :)

Go to advanced search