Search found 49 matches

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

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, ...
by sonyckson
Sat Nov 14, 2009 3:54 am
Forum: Volume 102 (10200-10299)
Topic: 10280 - Old Wine Into New Bottles
Replies: 15
Views: 6409

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...
by sonyckson
Sun Aug 03, 2008 6:07 pm
Forum: Volume 114 (11400-11499)
Topic: 11475 - Extend to Palindrome
Replies: 32
Views: 13794

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.
by sonyckson
Wed Jan 23, 2008 3:20 am
Forum: Volume 114 (11400-11499)
Topic: 11403 - Binary Multiplication
Replies: 25
Views: 9821

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. ...
by sonyckson
Mon Jan 21, 2008 4:29 am
Forum: Volume 113 (11300-11399)
Topic: 11386 - Triples
Replies: 23
Views: 8557

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.
by sonyckson
Mon Jan 21, 2008 4:23 am
Forum: Volume 113 (11300-11399)
Topic: 11378 - Bey Battle
Replies: 10
Views: 5286

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...
by sonyckson
Sun Jan 20, 2008 10:51 pm
Forum: Volume 114 (11400-11499)
Topic: 11400 - Lighting System Design
Replies: 6
Views: 3124

Thank you very much!. Eric.
by sonyckson
Sun Jan 20, 2008 10:00 pm
Forum: Volume 114 (11400-11499)
Topic: 11400 - Lighting System Design
Replies: 6
Views: 3124

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 ).
by sonyckson
Tue Jan 15, 2008 5:16 am
Forum: Volume 113 (11300-11399)
Topic: 11394 - Digit Blocks
Replies: 18
Views: 9011

I dont know tricky cases... but my program now gives:

Code: Select all

14
1
2
16
2435199
6529444
1757073698223
14635897285138
4133746960368
gl! Eric.
by sonyckson
Tue Jan 15, 2008 4:49 am
Forum: Volume 113 (11300-11399)
Topic: 11394 - Digit Blocks
Replies: 18
Views: 9011

My AC program gives the same output. gl! Eric.
by sonyckson
Mon Jan 14, 2008 5:49 am
Forum: Volume 113 (11300-11399)
Topic: 11385 - Da Vinci Code
Replies: 70
Views: 23384

Hi joshi!, im not sure, but i think there may be leading blank spaces. gl! Eric.
by sonyckson
Mon Jan 14, 2008 5:39 am
Forum: Volume 113 (11300-11399)
Topic: 11390 - The Sultan's Feast
Replies: 14
Views: 4990

Another hint?? i cant figure it out, i just see that you can get an acyclic graph with the component digraph.... :'(... Thanks!, Eric.
by sonyckson
Mon Jan 14, 2008 4:13 am
Forum: Volume 113 (11300-11399)
Topic: 11393 - Tri-Isomorphism
Replies: 6
Views: 2728

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...
by sonyckson
Sat Jan 12, 2008 9:02 pm
Forum: Volume 113 (11300-11399)
Topic: 11386 - Triples
Replies: 23
Views: 8557

I did an O((n^2)log(n)) solution, and i didnt have problems with the Time Limit. gl! Eric.
by sonyckson
Sat Jan 12, 2008 8:57 pm
Forum: Volume 113 (11300-11399)
Topic: 11394 - Digit Blocks
Replies: 18
Views: 9011

jvimal wrote: What is the answer if the input is "55"? Is it 2 or 4?
My Ac program gives 2.....

gl! Eric.

Go to advanced search