Search found 62 matches

by trulo17
Sat May 13, 2006 7:05 pm
Forum: Volume 110 (11000-11099)
Topic: 11029 - Leading and Trailing
Replies: 43
Views: 17349

kp: thx very much for helping.
jan holmes:for last 3 digits you can use logarithmic exponentiation.
by trulo17
Sat May 13, 2006 5:55 pm
Forum: Volume 110 (11000-11099)
Topic: 11029 - Leading and Trailing
Replies: 43
Views: 17349

11029 - Leading and Trailing

how to get the first tree digits? Can this be done in O(logn), i mean, is it realted with modular exponentiation?
by trulo17
Mon Apr 10, 2006 6:06 pm
Forum: C++
Topic: about hash_set and hash_map
Replies: 4
Views: 2441

struct word { char s[10]; }; struct hasher { size_t operator()( word x ) const { return hash< const char* >()( x.s ); } }; struct eqstr { bool operator()(word a,word b) { return strcmp(a.s,b.s)==0; } }; typedef hash_map<word,string,hasher,eqstr > myhash; i'm new to them too, all i can do is to post...
by trulo17
Tue Apr 04, 2006 4:49 am
Forum: C++
Topic: about hash_set and hash_map
Replies: 4
Views: 2441

about hash_set and hash_map

i know we can use these containers here in online judge, but i would like to know if they can be used in icpc regionals.
by trulo17
Mon Apr 03, 2006 12:41 am
Forum: Volume 110 (11000-11099)
Topic: 11024 - Circular Lock
Replies: 14
Views: 4318

it can be solved in O(p) . Change everthing to %p as suggested in description.Just try to figure out how many times you should press every one of the four buttons. During contest i got ac an O(p^2) solution.
by trulo17
Sun Apr 02, 2006 12:53 am
Forum: Volume 110 (11000-11099)
Topic: 11026 - A Grouping Problem
Replies: 28
Views: 18064

I don't know if what i did is the same that you're talking. Let a=1, b=2, c=3 (x-1)*(x-2)*(x-3) = x^3-6x^2+11x-6 a + b + c =6 ab+ac+bc= 11 abc=6 so we can multiply (x-x1)*(x-x2).....(x-xn) store the coeficients in an array and look for the coeficient with highest value mod m it got ac in 1.2 seconds...
by trulo17
Sat Apr 01, 2006 4:03 am
Forum: Algorithms
Topic: computational geometry problem
Replies: 0
Views: 730

computational geometry problem

hi every body, i would like some suggestions on solving this task
http://acmicpc-live-archive.uva.es/nuev ... php?p=3469
what i'm finding hard is to determine if a point is unreachable for being totally surrounded by circles, although not touched by any of them.
thx in advance
by trulo17
Tue Mar 21, 2006 6:16 pm
Forum: Volume 110 (11000-11099)
Topic: 11012 - Cosmic Cabbages
Replies: 29
Views: 8841

guess kalinov post just above is enough for solving this task
by trulo17
Tue Mar 14, 2006 6:50 am
Forum: Algorithms
Topic: O(2^n*n^2) algorithm for Travelling Ssalesman Problem
Replies: 4
Views: 1261

thank you very much for replying, it was what i needed :P
by trulo17
Mon Mar 06, 2006 1:48 am
Forum: C++
Topic: map by reference
Replies: 1
Views: 1304

map by reference

could anyone tell me how to pass a map to a function by reference?
by trulo17
Mon Mar 06, 2006 12:09 am
Forum: Other words
Topic: Who will be ACM ICPC 2006 World Final's Champion?
Replies: 23
Views: 8461

moscow state university performance in regionals make them favorite to me
by trulo17
Mon Mar 06, 2006 12:00 am
Forum: Algorithms
Topic: What algorithm should be used for some problem?
Replies: 1
Views: 922

maybe too late for replying but you can find the following link helpfull(although it's a very famous one)
http://www.comp.nus.edu.sg/~stevenha/pr ... mming.html
by trulo17
Sun Mar 05, 2006 11:56 pm
Forum: Algorithms
Topic: O(2^n*n^2) algorithm for Travelling Ssalesman Problem
Replies: 4
Views: 1261

thx for replying, there is a lot of info in the wiki, but what i'm looking for is the dp solution for this problem, for which i haven't found a good link(except for one in the forum, which explains the main idea). I understand the solution, but what i'm finding really hard is to implement it, so cou...
by trulo17
Sun Mar 05, 2006 4:09 am
Forum: Algorithms
Topic: O(2^n*n^2) algorithm for Travelling Ssalesman Problem
Replies: 4
Views: 1261

O(2^n*n^2) algorithm for Travelling Ssalesman Problem

In the forum there are some discussions about this topic, althought i understand the idea, i find it very hard to implement it, because i dont know how to enumerate the different sets, i mean it's not as "easy" as solving the matrix chain problem, so could somebody please post some pseudo code in or...
by trulo17
Sun Mar 05, 2006 4:01 am
Forum: Algorithms
Topic: A*
Replies: 5
Views: 1349

thx every body for answering, got a btter idea on how to solve this task now :D

Go to advanced search