## Search found 49 matches

Sun Oct 10, 2010 5:17 am
Forum: Volume 118 (11800-11899)
Topic: 11866 - Triangle
Replies: 6
Views: 2415

### Re: 11866 - Triangle

Basically, its easy to count the number of triples you can form with tree numbers between X and Y considering triples as sets (i mean considering (1,2,3) the same as (2,1,3) ). Then you only have to count the number of those triples that can not form a triangle. This means the numbers of triples x, ...
Sat Nov 14, 2009 3:54 am
Forum: Volume 102 (10200-10299)
Topic: 10280 - Old Wine Into New Bottles
Replies: 15
Views: 6603

### Re: 10280 - Old Wine Into New Bottles

I havent code it yet, but I think its also solvable ( althougth not too efficient ) with max = min... If you have <= 5000 bottles ( each with no empty space, just giving you the integer amount of wine they can take ), and you consider a matrix mat[5000], you can get in O(n^2) which amounts of wine m...
Sun Aug 03, 2008 6:07 pm
Forum: Volume 114 (11400-11499)
Topic: 11475 - Extend to Palindrome
Replies: 32
Views: 14583

### 11475 - Extend to Palindrome

Hi!, its not the first time i see this problem, and its not the first time i dont see how to solve it... any hints? thanks! Eric.
Wed Jan 23, 2008 3:20 am
Forum: Volume 114 (11400-11499)
Topic: 11403 - Binary Multiplication
Replies: 25
Views: 10131
Well, i think many of us had the same problem. Someone can say that there was a clarification, but as it was written ( "There's an empty line after each test case." ), i misunderstood the clarification, and i thought that there was a line after each case in the input. Anyway, it was a nice contest. ...
Mon Jan 21, 2008 4:29 am
Forum: Volume 113 (11300-11399)
Topic: 11386 - Triples
Replies: 23
Views: 8768
Probably yes, map is too slow for this problem, it will pass the TL if you use sorted array's and binary search. gl!, Eric.
Mon Jan 21, 2008 4:23 am
Forum: Volume 113 (11300-11399)
Topic: 11378 - Bey Battle
Replies: 10
Views: 5696
When there are two points, redefine the dist between then as max(diffx/2, diffy/2). This is the size of the largest square. Very near, the redefined distance ( the one should give us the size of the largest square ) betwen two points p1 = (x1,y1) and p2 = (x2,y2) is dist(p1,p2) = max(abs(x1-x2), ab...
Sun Jan 20, 2008 10:51 pm
Forum: Volume 114 (11400-11499)
Topic: 11400 - Lighting System Design
Replies: 6
Views: 3294
Thank you very much!. Eric.
Sun Jan 20, 2008 10:00 pm
Forum: Volume 114 (11400-11499)
Topic: 11400 - Lighting System Design
Replies: 6
Views: 3294

### 11400 - Lighting System Design

Hi, this problems seems like a Min-Cost-Max-Flow problem, but the cost of the sources complicate everything, can anyone give me a hint? Thanks, Eric.

PD: if it is not right to post this problem here i will delete it.
PD2: where there any tricky cases for the problem 11403 ( Binary Multiplication ).
Tue Jan 15, 2008 5:16 am
Forum: Volume 113 (11300-11399)
Topic: 11394 - Digit Blocks
Replies: 18
Views: 9281
I dont know tricky cases... but my program now gives:

Code: Select all

``````14
1
2
16
2435199
6529444
1757073698223
14635897285138
4133746960368
``````
gl! Eric.
Tue Jan 15, 2008 4:49 am
Forum: Volume 113 (11300-11399)
Topic: 11394 - Digit Blocks
Replies: 18
Views: 9281
My AC program gives the same output. gl! Eric.
Mon Jan 14, 2008 5:49 am
Forum: Volume 113 (11300-11399)
Topic: 11385 - Da Vinci Code
Replies: 70
Views: 24587
Hi joshi!, im not sure, but i think there may be leading blank spaces. gl! Eric.
Mon Jan 14, 2008 5:39 am
Forum: Volume 113 (11300-11399)
Topic: 11390 - The Sultan's Feast
Replies: 14
Views: 5112
Another hint?? i cant figure it out, i just see that you can get an acyclic graph with the component digraph.... :'(... Thanks!, Eric.
Mon Jan 14, 2008 4:13 am
Forum: Volume 113 (11300-11399)
Topic: 11393 - Tri-Isomorphism
Replies: 6
Views: 2797

### 11393 - Tri-Isomorphism

Well, i just wanna ask something, i did the "correct" solution ( at least the idea ) during the contest, but i thought the answer for input 1 was "YES" because you can have 3 empty lists of edges for each subgraph and ( as i see ) everything will be ok with the definitions given at the problem state...
Sat Jan 12, 2008 9:02 pm
Forum: Volume 113 (11300-11399)
Topic: 11386 - Triples
Replies: 23
Views: 8768
I did an O((n^2)log(n)) solution, and i didnt have problems with the Time Limit. gl! Eric.
Sat Jan 12, 2008 8:57 pm
Forum: Volume 113 (11300-11399)
Topic: 11394 - Digit Blocks
Replies: 18
Views: 9281
jvimal wrote: What is the answer if the input is "55"? Is it 2 or 4?
My Ac program gives 2.....

gl! Eric.