Search found 29 matches

by Eric3k
Sun Aug 08, 2004 8:18 pm
Forum: Volume 100 (10000-10099)
Topic: 10099 - The Tourist Guide
Replies: 91
Views: 28944

You should set all the values of map to 0 for every test case and then read the input.
by Eric3k
Wed Jul 21, 2004 5:51 am
Forum: Volume 101 (10100-10199)
Topic: 10159 - Star
Replies: 9
Views: 2854

10159 - Star

Hey guys,
I'm wondering if there's an easier way to solve this problem. What I'm thinking of is create a grid with the triangles, where each cell contains 2 triangles. Then use recursion to get the solution. However, it would be long and inefficient.
Any other ideas?
Thanks.
by Eric3k
Mon Jul 07, 2003 5:59 am
Forum: Volume 105 (10500-10599)
Topic: 10527 - Persistent Numbers
Replies: 26
Views: 11630

Hi, Try changing istream& operator >>(istream& instr, bigint& N) to this instead: [cpp]while(isdigit(instr.peek())) buffer.push_back(instr.get()); if (instr.peek()!='\n'){ instr.setstate(instr.failbit); instr.setstate(instr.eofbit); //Maybe this one too }[/cpp] If it still do not work, I'll look at ...
by Eric3k
Mon Jul 07, 2003 12:20 am
Forum: Volume 105 (10500-10599)
Topic: 10527 - Persistent Numbers
Replies: 26
Views: 11630

I don't have one right now. I'll make it in the upcoming days. Probably using recursion will make very short (able to be typed in a few minutes).
I'm guessing the basic operations for a general would be toString, add, sub, mult, div, mod, and exp.
-Eric
by Eric3k
Sun Jul 06, 2003 5:20 pm
Forum: Volume 105 (10500-10599)
Topic: 10527 - Persistent Numbers
Replies: 26
Views: 11630

Thx

Ahh I'm an idiot! :oops: I misread the problem. I thought there would be in the input up to 1000 numbers, but it's 1000 digits.
Thanks for pointing that out! :D
by Eric3k
Sun Jul 06, 2003 5:20 am
Forum: Volume 105 (10500-10599)
Topic: 10527 - Persistent Numbers
Replies: 26
Views: 11630

10527 - Persistent Numbers

Hi, Could anyone please point me to the error I might have in the code. I can't seem to find it. It looks like it works for every case I've tried but get WA in systests. Maybe I'm using the wrong algorithm? Here's how it tries to solve it: 1. Loops from i = 2 to 9 and if it's possible to divide the ...
by Eric3k
Thu Jul 03, 2003 3:46 pm
Forum: C++
Topic: What version g++ is used?
Replies: 1
Views: 1635

I think if you use ios:: instead of ios_base::, it should work. I've used it before and it compiles fine.
by Eric3k
Tue May 20, 2003 8:49 pm
Forum: C++
Topic: DJGPP sucks ?
Replies: 1
Views: 1532

You have to specify the namespace std;

#include <iostream>

using namespace std;

int main()
{
cout<<"DJGPP sucks ?";

return 0;
}

Or otherwise use std::cout or include iostream.h
by Eric3k
Sat May 10, 2003 3:39 am
Forum: Volume 7 (700-799)
Topic: 760 - DNA Sequencing
Replies: 33
Views: 12775

760?

Prog 760, DNA sequencing, http://acm.uva.es/p/v7/760.html, in the first input, it has atgc and tgc and the corresponging output tg. However, shouldn't it be tgc?
Thx
by Eric3k
Tue May 06, 2003 4:16 am
Forum: Other words
Topic: Programming challenges book
Replies: 6
Views: 1744

The book still appears in Barnes & Nobles and Amazon as not yet released. Do you happen to know in what bookstores it is in?
Thx
by Eric3k
Sun Mar 30, 2003 6:57 pm
Forum: Other words
Topic: World Finals 2003 Discussion Thread
Replies: 32
Views: 8823

Yeah I guess they should be distributed a bit more fairly. Perhaps the three each having about 20. Or it would probably be better to distribute them according to the amount of universities in each continent.
by Eric3k
Sun Mar 30, 2003 5:24 am
Forum: Other words
Topic: World Finals 2003 Discussion Thread
Replies: 32
Views: 8823

I was actually reluctant to post the above in fear of staging a war and so will refrain from fueling it, especially since this is a programming forum. :o Ad hominem. Attack my arguments, not my personality. Back at you! BTW I was stating an opinion, not attacking your argument by such. Mainly based ...
by Eric3k
Sun Mar 30, 2003 4:18 am
Forum: Other words
Topic: World Finals 2003 Discussion Thread
Replies: 32
Views: 8823

Don't forget US had 3 schools score on the top 10 last year, MIT placing 2nd. Just because a country has a bad year does not necessarily mean their students or universities stink. :x Luck plays a great role many times, although not always. BTW jingye, "An undergraduate, or even high school, educatio...
by Eric3k
Sun Mar 30, 2003 4:07 am
Forum: Other words
Topic: Programming challenges book
Replies: 6
Views: 1744

Thanks! I would have thought it would have been released earlier since on amazon it states: Springer Verlag; (March 28, 2003) . But I guess it takes longer to actually release it.
by Eric3k
Sat Mar 29, 2003 1:49 am
Forum: Other words
Topic: Programming challenges book
Replies: 6
Views: 1744

Programming challenges book

Just wondering if anyone knows when the book will be released?
Thx

Go to advanced search