Search found 167 matches

by Ivan Golubev
Sat Dec 14, 2002 3:08 pm
Forum: Volume 100 (10000-10099)
Topic: 10095 - Saving the Planet
Replies: 8
Views: 2991

Well, my computational geometry also isn't very good but I think that this problem is very close to P10005 (Packing polygons). For that problem I've used 2D convex hull and 2D centroid algorithms. I think that 3D convex hull and 3D centroid algos will works for P10095. Though 3D convex hull looks a ...
by Ivan Golubev
Sat Dec 14, 2002 1:12 am
Forum: Volume 100 (10000-10099)
Topic: 10095 - Saving the Planet
Replies: 8
Views: 2991

Doesn't it a "finding 3D convex hull" problem?..
by Ivan Golubev
Fri Dec 13, 2002 4:29 pm
Forum: Volume 1 (100-199)
Topic: 192 - Synchronous Design
Replies: 11
Views: 2211

There must be a point after delay's value, i.e.
[c] if (nmax > ct)
printf("Clock period exceeded.\n");
else
printf("Synchronous design. Maximum delay: %d.\n", nmax);
[/c]
by Ivan Golubev
Mon Dec 02, 2002 9:24 pm
Forum: C++
Topic: Grow Array Size
Replies: 13
Views: 4539

Yarin wrote:With optimizations turned off, the pointer method should be faster.
I'm not sure about this -- if pointer isn't register variable speed will be nearly the same.

Anyway, printf("%s", str); will be faster than outputting character by character.
by Ivan Golubev
Fri Nov 22, 2002 9:11 pm
Forum: Volume 3 (300-399)
Topic: 392 - Polynomial Showdown
Replies: 93
Views: 17943

Re: 392 PLZ Help

rakeb wrote:What will be the out put if all inputs are zero
i.e.
0 0 0 0 0 0 0 0 0
Output is just 0.
by Ivan Golubev
Fri Nov 22, 2002 9:06 pm
Forum: Volume 101 (10100-10199)
Topic: 10191 - Longest Nap
Replies: 75
Views: 23299

[c] assert(gets(s) != NULL);
assert(sscanf(s, "%d:%d %d:%d", &h1, &m1, &h2, &m2) == 4);
l1 = h1 * 60 + m1;
l2 = h2 * 60 + m2;[/c]
by Ivan Golubev
Fri Nov 22, 2002 2:55 pm
Forum: Volume 1 (100-199)
Topic: 164 - String Computer
Replies: 120
Views: 11172

junjieliang wrote:Did you take into account empty strings, ie blank lines?
Yes, my solution can handle cases with blank lines.
by Ivan Golubev
Fri Nov 22, 2002 2:55 pm
Forum: Volume 103 (10300-10399)
Topic: 10316 - Airline Hub
Replies: 25
Views: 7644

AFAIR, there was a thread about this problem earlier. You're need to use epsilon to compare floating point values.
by Ivan Golubev
Wed Nov 20, 2002 3:32 pm
Forum: Volume 1 (100-199)
Topic: 164 - String Computer
Replies: 120
Views: 11172

junjieliang wrote:I'm getting WA as well, but the problem is that my code works for 526. Isn't both problems about edit distance? Could someone tell me the difference (if any) between the two problems?
I've got AC for P164 and WA for P526 (with same algorithm), so I'm also puzzled about this thing...
by Ivan Golubev
Fri Nov 08, 2002 8:53 pm
Forum: Pascal
Topic: How fast is Pascal?
Replies: 7
Views: 9080

To fpnc Hmm, is it real that judge system is PIII 1.5GHz? Judge status page shows ~1600 bogomips and this looks like that OJ system still running at PIII-800 processor... Also, check out ranklist for P10399, there is a running time 1.1000 (which seems to be 2 seconds). Don't you think that it's a bi...
by Ivan Golubev
Wed Nov 06, 2002 4:55 pm
Forum: Volume 104 (10400-10499)
Topic: 10402 - Triangle Covering
Replies: 37
Views: 5640

Adil wrote:thus, AB = 2 * r / sin(60 deg)
This is trivial, don't you think that 2.3094010767585 == 2 / sin(60) ? The problem in this case that points P1 & P2 won't be at the triangle border (at least, in my computations, may be I'm wrong but I don't think so).
by Ivan Golubev
Wed Nov 06, 2002 9:52 am
Forum: Volume 1 (100-199)
Topic: 110 - Meta-Loopless Sorts
Replies: 92
Views: 7646

lowai wrote:what is the correct output of n==1?
Exactly three semi-colons must appear in the program

after the program header: program sort(input,output);
after the variable declaration: ...: integer;
after the readln statement: readln(...);
by Ivan Golubev
Wed Nov 06, 2002 9:51 am
Forum: Volume 100 (10000-10099)
Topic: 10093 - An Easy Problem!
Replies: 52
Views: 14963

Each line in the input file will contain an integer (as defined in mathematics) number of any integer base (2..62).
Do you think that, for example, -1000 is not an integer and it's incorrect as input value?
by Ivan Golubev
Tue Nov 05, 2002 5:05 pm
Forum: Volume 104 (10400-10499)
Topic: 10402 - Triangle Covering
Replies: 37
Views: 5640

10402 - Triangle Covering

I'm just puzzled with this problem, mainly with case T4. http://www.golubev.com/uva/v104/10402.gif In my computations if P1 (and P2) is a point of intersections of three lines (for short, PITL) then constant == 2.312677596894 and P3 is not a PITL, otherwise if P3 is PITL then P1 and p2 cannot be PIT...
by Ivan Golubev
Mon Nov 04, 2002 6:56 pm
Forum: Volume 1 (100-199)
Topic: 110 - Meta-Loopless Sorts
Replies: 92
Views: 7646

Looking at the accepted percentage I won't be surprised that problem's description is a bit incomplete...

Anyway, your solution produces incorrect code for n == 1.

Go to advanced search