## Search found 62 matches

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

### 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?
Mon Apr 10, 2006 6:06 pm
Forum: C++
Replies: 4
Views: 2471
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...
Tue Apr 04, 2006 4:49 am
Forum: C++
Replies: 4
Views: 2471

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.
Mon Apr 03, 2006 12:41 am
Forum: Volume 110 (11000-11099)
Topic: 11024 - Circular Lock
Replies: 14
Views: 4390
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.
Sun Apr 02, 2006 12:53 am
Forum: Volume 110 (11000-11099)
Topic: 11026 - A Grouping Problem
Replies: 28
Views: 18289
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...
Sat Apr 01, 2006 4:03 am
Forum: Algorithms
Topic: computational geometry problem
Replies: 0
Views: 745

### 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.
Tue Mar 21, 2006 6:16 pm
Forum: Volume 110 (11000-11099)
Topic: 11012 - Cosmic Cabbages
Replies: 29
Views: 8995
guess kalinov post just above is enough for solving this task
Tue Mar 14, 2006 6:50 am
Forum: Algorithms
Topic: O(2^n*n^2) algorithm for Travelling Ssalesman Problem
Replies: 4
Views: 1296
thank you very much for replying, it was what i needed
Mon Mar 06, 2006 1:48 am
Forum: C++
Topic: map by reference
Replies: 1
Views: 1327

### map by reference

could anyone tell me how to pass a map to a function by reference?
Mon Mar 06, 2006 12:09 am
Forum: Other words
Topic: Who will be ACM ICPC 2006 World Final's Champion?
Replies: 23
Views: 8561
moscow state university performance in regionals make them favorite to me
Mon Mar 06, 2006 12:00 am
Forum: Algorithms
Topic: What algorithm should be used for some problem?
Replies: 1
Views: 941
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
Sun Mar 05, 2006 11:56 pm
Forum: Algorithms
Topic: O(2^n*n^2) algorithm for Travelling Ssalesman Problem
Replies: 4
Views: 1296
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...
Sun Mar 05, 2006 4:09 am
Forum: Algorithms
Topic: O(2^n*n^2) algorithm for Travelling Ssalesman Problem
Replies: 4
Views: 1296

### 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...
Sun Mar 05, 2006 4:01 am
Forum: Algorithms
Topic: A*
Replies: 5
Views: 1390
thx every body for answering, got a btter idea on how to solve this task now