Search found 51 matches

by maxdiver
Sun Jan 20, 2008 12:19 pm
Forum: C++
Topic: about reading multiple lines in C++
Replies: 5
Views: 3158

Leonid Yes, absolutely right. gets() is dozens of times faster than getline(), but... it's not a C++-way :) theme of "gets vs. getline" was repeated many times at this forum, but I think I won't be bad to repeat it again: if you read/write less than 100 kb - you can use cin/getline/cout etc. withou...
by maxdiver
Sun Jan 20, 2008 12:13 pm
Forum: C++
Topic: freopen--stdin??
Replies: 7
Views: 4749

just fclose, and no problems guys :)

Fibonacci_Prower
your solution is not useful for windows coders, though, for course, it's a solution :)
by maxdiver
Sun Jan 20, 2008 12:12 pm
Forum: C
Topic: link for GNU C compiler
Replies: 4
Views: 4787

A1
)))))))
DONLINE_JUDGE means only the same as "#define ONLINE_JUDGE" ;)
by maxdiver
Thu Jan 17, 2008 2:44 pm
Forum: C++
Topic: about reading multiple lines in C++
Replies: 5
Views: 3158

In C++ you can read strings only with
getline (cin, s)
or
cin >> s
So there is no such function that can read two lines into one string.
by maxdiver
Thu Jan 10, 2008 3:12 pm
Forum: Bugs and suggestions
Topic: No Forum in new UVA site ?
Replies: 6
Views: 1793

Due to admin's posts in this forum, the new system is still developing, and they focus efforts on judging system itself...
by maxdiver
Mon Jan 07, 2008 10:34 pm
Forum: Algorithms
Topic: V = 2^i * 3^j * 5^k, how 2 work out the problem efficiently?
Replies: 7
Views: 6227

This common method is known as "moving pointers" method.
(Excuse me for my bad english :) )
by maxdiver
Sun Dec 23, 2007 5:22 pm
Forum: Algorithms
Topic: Joining polygons
Replies: 7
Views: 2637

Is this problem the same problem as "external(outside) border(verge) of polygon"?
(I know English badly, so I'm not quite sure of English transcription)
by maxdiver
Mon Dec 10, 2007 11:17 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 43550

If you want help, you should put your full code here.
by maxdiver
Fri Nov 23, 2007 1:20 pm
Forum: C++
Topic: How to single 8 bit Varialbles Store in Single Bytes
Replies: 3
Views: 2329

Maybe you need bitwise operations?

int bit1 = byte & 1;
int bit2 = (byte >> 1) & 1;
int bit3 = (byte >> 2) & 1;
int bit4 = (byte >> 3) & 1;
by maxdiver
Fri Nov 16, 2007 1:18 pm
Forum: Algorithms
Topic: Suffix tree construction
Replies: 13
Views: 4660

Girogi
I have only russian translation of this book :)
by maxdiver
Tue Nov 13, 2007 11:24 am
Forum: Bugs and suggestions
Topic: Java validation time
Replies: 4
Views: 3256

GetProcessTimes()?
(though I didn't experimented with JVM :) )
by maxdiver
Tue Nov 13, 2007 11:21 am
Forum: Algorithms
Topic: Suffix tree construction
Replies: 13
Views: 4660

Look at the book
Gusfield "Algorithms on Strings, Trees and Sequences"
In this book you will find all that you need, and even more :)

Of course, you could find this book in the Internet in a free electronic version.
by maxdiver
Sun Oct 07, 2007 12:51 pm
Forum: Volume 100 (10000-10099)
Topic: 10029 - Edit Step Ladders
Replies: 70
Views: 21534

Please could anybody send me the solution of this problem?

I tried to solve it with hashing + DP, but i get WA with 0.7 sec :(

Thanks.
by maxdiver
Wed Oct 03, 2007 9:49 pm
Forum: C++
Topic: C++ Template Specialisation Problem
Replies: 9
Views: 3909

OK. So you need template "pointed_value_is_integral". As Krzysztof Duleba said, there is only one way - explicit initialization. I can only present the case: I found just the same template (I've forgotten its name) in STL of Microsoft compiler, and it was implemented by explicit specialization. Some...
by maxdiver
Wed Oct 03, 2007 1:33 pm
Forum: C++
Topic: C++ Template Specialisation Problem
Replies: 9
Views: 3909

I can't understand your idea, why you want to use this construction. I found only two solutions, but both of them are not very good: 1) specialize traits<X<T>::Y> for each T manually 2) declare another traits_X<>: template<typename T> struct trait_X { typedef typename X<T>::Y Y; typedef true_type va...

Go to advanced search