## Search found 149 matches

Fri Jun 27, 2008 10:28 pm
Forum: Volume 114 (11400-11499)
Topic: 11450 - Wedding shopping
Replies: 14
Views: 6153

### Re: 11450 - Wedding shopping

I am trying DP. Can you give me some test cases... getting WAs. thanks.
[EDIT] stupid me... I 've found the error.
Fri Jun 27, 2008 8:22 am
Forum: Volume 114 (11400-11499)
Topic: 11408 - Count DePrimes
Replies: 12
Views: 5582

### Re: 11408 - Count DePrimes

I get ACC with 1.5 s. My basic idea is to have a sieve like approach and then answering query in O(1). There are some very fast solutions to this problem. Any one care to share the idea ? thanks.
Tue Jun 24, 2008 7:50 am
Forum: Volume 114 (11400-11499)
Topic: 11451 - Water restrictions
Replies: 23
Views: 3067

### Re: 11451 - Water restrictions

andmej, I 've sent you a pm...
Mon Jun 23, 2008 8:50 pm
Forum: Other words
Topic: Felix Halim's Hunting UVA Problems returns!
Replies: 7
Views: 6860

### Re: Felix Halim's Hunting UVA Problems returns!

Hi, I found my user_id following the way Robert said...
There was a statistics comparator in that site... Is it disabled now or its just me not finding that link. Are there some similar sites where stat comparison is possible to find common or mutually exclusive solved problems of >1 user?

thanks.
Mon Jun 23, 2008 7:08 pm
Forum: Volume 114 (11400-11499)
Topic: 11451 - Water restrictions
Replies: 23
Views: 3067

### Re: 11451 - Water restrictions

I 've precalculated the cover of the sprinklers using bits. bits denote positions covered by the sprinkler. int is enough as total position is at most 20. void Cover(int S) { int i, j, temp; memset(cov, 0, sizeof(cov)); for (i=0; i<S; i++) { for (j=1; j<=m[i]; j++) { temp = cov[i][j-1]; temp |= 1<<p...
Mon Jun 23, 2008 5:21 pm
Forum: Volume 114 (11400-11499)
Topic: 11451 - Water restrictions
Replies: 23
Views: 3067

### Re: 11451 - Water restrictions

Thanks. got ACC. but my dp idea was not correct, ACC with bruteforce...
Sun Jun 22, 2008 5:16 pm
Forum: Volume 114 (11400-11499)
Topic: 11451 - Water restrictions
Replies: 23
Views: 3067

### Re: 11451 - Water restrictions

According to my program, the solution is 19 with d = [ 1, 2, 1, 0, 1, 2 ]. With these, positions that are irrigated are: 1, 3, 4, 5, 7, 8, 9, 11, 12, 14, 15, 16, 18 and 19. total: 14 locations. Why the answer is 19? I 've misunderstood the problem... Can you please tell me what the problem wants an...
Thu Jun 19, 2008 7:30 pm
Forum: Volume 113 (11300-11399)
Topic: 11389 - The Bus Driver Problem
Replies: 10
Views: 7221

### Re: 11389 - The Bus Driver Problem

Your code is wrong. Think about a greedy approach using sorting.
Fri Oct 26, 2007 5:46 am
Forum: Off topic (General chit-chat)
Topic: 6,000,000!
Replies: 2
Views: 33218
good that it's an ACC :d
Fri Oct 05, 2007 12:12 pm
Forum: Volume 112 (11200-11299)
Topic: 11286 - Conformity
Replies: 19
Views: 8602
I get WA for this problem, due to the current status of the new server, I don't know whether it is really WA or other errors shown as WA. I 've tried some test cases and got correct answer. I 've tried to implement a trie. Can you people help me? thanks. [EDIT] I misunderstood the problem, ACC now. ...
Tue Oct 02, 2007 2:23 pm
Forum: Volume 112 (11200-11299)
Topic: 11286 - Conformity
Replies: 19
Views: 8602

### Thanks...

I thought of trie, too. I 'll try to implement this. to sclo, thanks for this suggestion. I will try map, vector and other STL stuff. thanks all for helping me.
Mon Oct 01, 2007 4:52 pm
Forum: Volume 112 (11200-11299)
Topic: 11286 - Conformity
Replies: 19
Views: 8602

### 11286 - Conformity

What is the best data structure in this problem to look for duplication? I don't know STL stuff, I only know basic C code... Any suggestion is welcome.
Mon Sep 10, 2007 7:22 pm
Forum: Bugs and suggestions
Topic: Some Suggestions
Replies: 13
Views: 3980
Though I think these will be added in the future, it is worth mentioning here...

At Submission page>>
there should be the problem number, not only the problem name.
there should be a link to the problem statistics as before.
Mon Sep 10, 2007 7:10 pm
Forum: Volume 106 (10600-10699)
Topic: 10670 - Work Reduction
Replies: 10
Views: 7448
Joy, I 've not read your code properly, but why don't you use qsort() for this problem... it suits well here. my cost calculation function goes here: int CostCalc(int i) { int cost, rest; cost = 0; if (!(agencies[i].a)) return cost; rest = n; while (rest - (int)ceil((double)rest/2) >= m && (rest/2))...
Wed Sep 05, 2007 6:30 pm
Forum: Bugs and suggestions
Topic: 11268-Reliable Network
Replies: 0
Views: 1696

### 11268-Reliable Network

Problem statement says: For each test case output should contain e+2 lines where e is the number of connections needed. First line contains e. line 2 to e+1 contains 2 integers i and j denoting that there should be a connection between the router i and router j. line e+2 is blank. But in the sample ...