Search found 49 matches

Fri Jul 09, 2004 2:53 pm
Forum: Volume 105 (10500-10599)
Topic: 10535 - Shooter
Replies: 25
Views: 48991
Does anybody have any tricky data to 10535? I know that my code is quite long. I added a lot of debugging data to it. I have tried to rewrite my code a few times. But I still get WA. [cpp] #include <cstdio> #include <set> #include <map> #include <math.h> #include <assert.h> #include <vector> #includ...
Fri Jul 09, 2004 10:37 am
Forum: Volume 105 (10500-10599)
Topic: 10535 - Shooter
Replies: 25
Views: 48991
This input is wrong.
Because "The shooter will never stand on a wall."
Sun Feb 08, 2004 2:55 pm
Forum: Volume 101 (10100-10199)
Topic: 10104 - Euclid Problem
Replies: 29
Views: 10125
it means that abs(x) + abs(y) has to be as low as possible
if you have pairs:
(-1) (3) the sum is 4

(1) (-2) the sum is 3

that's why you choose second pair instead of first one.
If you have two pairs with equal sum then you take player in which x < y
Wed Feb 04, 2004 5:32 pm
Forum: Volume 1 (100-199)
Topic: 175 - Keywords
Replies: 13
Views: 3700
so the correct time for this problem i P * T * (n_of_words)^2 ?
Sun Feb 01, 2004 11:41 am
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 21761
i have rewritten this algorithm to remove floating points and i got WA.
Then i found that in last lint there is bug
printf("%6.2f %17ld\n",x,r);
//
it should be printf("%6.2f %17lld\n",x,r);
Sun Feb 01, 2004 12:34 am
Forum: C++
Topic: long long with printf
Replies: 5
Views: 2174

long long with printf

I tried to use: printf("%lld,r); and printf("%I64d,r); to print long longer but it doesn't work on acm

int main()
{
long long r = 12345678901234LL;

printf("%lld,r);

}
Sat Jan 31, 2004 5:51 pm
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 21761

147 why do i get WA?

I can't figure it out why i am getting WA maybe it is IO problem? [cpp] #include <stdio.h> #define MAXV 8000 #define NCOINS 11 int main( void ) { int i, j, k; int coins[] = { 1, 2, 4, 10, 20, 40, 100, 200, 400, 1000, 2000 }; unsigned long d[MAXV+1][NCOINS]; for(i = 0; i <= MAXV; ++i) for(j = 0; j < ...
Thu Jan 29, 2004 10:26 am
Forum: Volume 1 (100-199)
Topic: 130 - Roman Roulette
Replies: 25
Views: 2389
thx, i now i understand it after a few months of trying
Thu Jan 29, 2004 12:21 am
Forum: Volume 1 (100-199)
Topic: 130 - Roman Roulette
Replies: 25
Views: 2389

problem 130

i completly don't understand this problem.
In case n = 5 k = 2 i =1
Why the order is 2,5,3,1?
Should it be 2,4,1,5 ?
Sat Feb 01, 2003 8:46 pm
Forum: Pascal
Topic: 64 bit integer in pascal
Replies: 2
Views: 3759

64 bit integer in pascal

How to use 64 bit integer in pascal?
Sat Feb 01, 2003 1:28 am
Forum: Java
Topic: speed of java and c++
Replies: 20
Views: 9079

speed of java and c++

Hi
Does anybody know how many times on average is c++ faster than java?
Is 2, 10, 100 or maybe 1000 times??
Wed Dec 18, 2002 1:14 pm
Forum: Algorithms
Topic: How to generate unique permutation
Replies: 2
Views: 2775
Hi
Why don't you use stl buildin next_permutation libiary?
for example
http://www.sgi.com/tech/stl/next_permutation.html
Fri Dec 13, 2002 11:57 am
Forum: Volume 101 (10100-10199)
Topic: 10126 - Zipf's Law
Replies: 36
Views: 8891
you could use string, but it doesn't work with c, c++ only:((
Thu Dec 12, 2002 10:00 pm
Forum: Volume 1 (100-199)
Topic: 152 - Tree's a Crowd
Replies: 30
Views: 3941

152 - Tree's a Crowd

Is there any metod faster than O(N^2)?
I think that i can put all trees in table, and give them value
x + y + z, then sort them so I woulnd't have do in average case N * N compations, it should be in best case 20 times lover.
Thu Dec 12, 2002 5:45 pm
Forum: Volume 1 (100-199)
Topic: 109 - SCUD Busters
Replies: 96
Views: 24653
i think i don't undestand the problem
if missile hits a point
for example 1,1

all power plants in radius 1 will be destroyed??
etc 0,0 ; 0,1 ; 0,2; 1,0;1,1;1,2; 2,0; 2,1 ; 2,2 ???