Search found 91 matches

Mon Aug 28, 2006 1:00 pm
Forum: Volume 110 (11000-11099)
Topic: 11056 - Formula 1
Replies: 34
Views: 16588
IRA wrote:Thank you!
I got AC!
Mon Aug 28, 2006 11:30 am
Forum: Volume 110 (11000-11099)
Topic: 11056 - Formula 1
Replies: 34
Views: 16588
Does have this input data? 3 Schumacher : 3 min 23 sec 172 ms Barrichello : 2 min 12 sec 999 ms Schumacher : 1 min 23 sec 172 ms is the output as follow? Row 1 Schumacher Barrichello Your output is wrong. Read carefully problem statement again http://acm.uva.es/p/v110/11056.html . If there are two ...
Mon Aug 28, 2006 10:12 am
Forum: Volume 110 (11000-11099)
Topic: 11072 - Points
Replies: 24
Views: 13849
What algorithm did you use to make convex hull? I used Graham's scan, but it too slow. (Note, that you can use cross product to check if three points create a clockwise or a counter-clockwise turn and so there is no need to use float arithmetics.) If you use float arithmetic to check it you will ge...
Sun Aug 27, 2006 11:50 am
Forum: Volume 110 (11000-11099)
Topic: 11072 - Points
Replies: 24
Views: 13849
What algorithm did you use to make convex hull? I used Graham's scan, but it too slow.
Fri Aug 25, 2006 10:02 pm
Forum: Volume 110 (11000-11099)
Topic: 11071 - Permutation Representation
Replies: 17
Views: 9527
When I said heap I only meant using the idea that a node with index i has one child at index 2 * i, and the other at 2 * i + 1. So a binary tree can be represented in an integer array without the need of using left or right pointers. mmm... I tried to use this implementation, but got RTE. After I c...
Fri Aug 25, 2006 5:28 pm
Forum: Volume 110 (11000-11099)
Topic: 11047 - The Scrooge Co Problem
Replies: 31
Views: 14137
My solution outputs the same except it doesn't print "\n\n" between test cases. In problem's description it isn't said about this. Why do you print "\n\n"?
Fri Aug 25, 2006 4:34 pm
Forum: C++
Topic: don't understand how to fix error
Replies: 2
Views: 1643
спасибо
Fri Aug 25, 2006 4:22 pm
Forum: Volume 110 (11000-11099)
Topic: 11047 - The Scrooge Co Problem
Replies: 31
Views: 14137
Please, give me output for this input 3 4 g1 g2 g3 g4 10 1 0 -1 1 1 2 -1 -1 -1 2 3 -1 -1 -1 5 16 leha1 g1 g1 leha2 g1 g2 leha3 g1 g3 leha4 g1 g4 leha5 g2 g1 leha6 g2 g2 leha7 g2 g3 leha8 g2 g4 leha9 g3 g1 leha10 g3 g2 leha11 g3 g3 leha12 g3 g4 leha13 g4 g1 leha14 g4 g2 leha15 g4 g3 leha16 g4 g4 4 g1...
Fri Aug 25, 2006 1:34 pm
Forum: C++
Topic: don't understand how to fix error
Replies: 2
Views: 1643

don't understand how to fix error

Judge doesn't compile next code and I don't understand why. #include <iostream> #include <stack> #include <vector> #include <math.h> #include <algorithm> #define sqr(a) ((a)*(a)) struct Point { int x,y; Point(){} Point(int X,int Y):x(X),y(Y){} }; double distance(Point const &l,Point const &r) { retu...
Sun Aug 20, 2006 7:57 pm
Forum: Volume 110 (11000-11099)
Topic: 11071 - Permutation Representation
Replies: 17
Views: 9527
some I/O please, Input: 3 1 2 3 3 2 1 3 1 2 3 2 1 3 4 1 2 3 4 4 2 1 3 3 1 2 3 3 1 2 4 1 2 3 4 2 4 1 3 4 1 2 3 4 4 1 2 3 3 1 2 3 2 3 1 7 1 2 3 4 5 6 7 6 5 1 7 2 4 3 7 1 2 3 4 5 6 7 2 4 5 6 7 3 1 6 1 2 3 4 5 6 3 5 1 4 6 2 9 1 2 3 4 5 6 7 8 9 2 4 9 8 7 1 3 6 5 10 1 2 3 4 5 6 7 8 9 10 1 6 7 3 9 8 4 2 5...
Sat Aug 19, 2006 6:01 pm
Forum: Volume 110 (11000-11099)
Topic: 11071 - Permutation Representation
Replies: 17
Views: 9527
A little hint: If you keep a pointer at the currently last element (elements n, n-1, ... i+1 are are already placed at their correct position and we don't care about them anymore). Then, we are interested in the number of elements which are in between element i and the currently last element (this ...
Mon Aug 14, 2006 11:21 am
Forum: Volume 110 (11000-11099)
Topic: 11064 - Number Theory
Replies: 25
Views: 16210
How to do prime factorization efficiently? Well, I don't know, I just go through primes in order, nothing fancy, and it usually works fine. Yes, I understand your point, but the question is: Do you have a list of the primes to do this? Until which number? If not, how can you "go through primes in o...
Sun Aug 06, 2006 11:09 am
Forum: Volume 110 (11000-11099)
Topic: 11056 - Formula 1
Replies: 34
Views: 16588
thanks a lot, got accepted.
Sun Aug 06, 2006 10:28 am
Forum: Volume 110 (11000-11099)
Topic: 11062 - Andy's Second Dictionary
Replies: 38
Views: 18467
my accepted program produces