## Search found 24 matches

Mon Jul 14, 2008 12:08 pm
Forum: Volume 114 (11400-11499)
Topic: 11467 - Pythagorean Triangles
Replies: 3
Views: 1106

### Re: 11467 - Pythagorean Triangles

My AC program gives the same answer except two last.

My answer for two last is:

1999
95302811479600

2000
95500247758096
Sat Jul 12, 2008 11:28 pm
Forum: Volume 114 (11400-11499)
Topic: 11468 - Substring
Replies: 2
Views: 1138

### 11468 - Substring

Hi everybody! So many people try to solve this problem and nobody can... For my solution judge says "Wrong answer" but I think my solution is correct... Give me any hint please. In addition I generated random test. Let's compare our results :) 50 20 gCoyzmyHxK Sgq wHl 9 aCY53ro5R8H9AHE3 JIrqYefYtj C...
Sat Jul 12, 2008 11:00 pm
Forum: Volume 114 (11400-11499)
Topic: 11466 - Largest Prime Divisor
Replies: 29
Views: 16212

### Re: 11466 - Largest Prime Divisor

There are nothing in problem statement about sign of numbers. So I think they can be negative...
Sun May 20, 2007 11:55 am
Forum: Volume 112 (11200-11299)
Topic: 11201 - The problem of the crazy linguist
Replies: 21
Views: 10147
Oh!

((( now I understand my mistake.

AC now in my solution no brute force. Complexity is O(len(s))
Sat May 19, 2007 5:38 pm
Forum: Volume 112 (11200-11299)
Topic: 11201 - The problem of the crazy linguist
Replies: 21
Views: 10147
Yes
Sat May 19, 2007 2:57 pm
Forum: Volume 112 (11200-11299)
Topic: 11201 - The problem of the crazy linguist
Replies: 21
Views: 10147

### 11201 - The problem of the crazy linguist

Why WA?

my coefficients of average of the SBC are:

AV[0] = 0;
AV[1] = 5506 / 2100;
AV[2] = 216824 / 10500;
AV[3] = 299414 / 10500;
AV[4] = 678002 / 10500;
AV[5] = 271884 / 3500;
AV[6] = 461178 / 3500;
AV[7] = 1576244 / 10500;

But i have WA why?
Sun Jul 23, 2006 6:14 pm
Forum: Volume 110 (11000-11099)
Topic: 11054 - Wine trading in Gergovia
Replies: 25
Views: 7003

### Re: 11054

Hi guys.. I solved this problem & I keep getting WA althought I tried almost everything.. I wonder if anyone has got the test cases for it??? or anyone think about some case that may not work... Thanks.. Hi! I got WA at contest... Because answer can be grater than 2^31 - 1. When i've used long long...
Sat May 20, 2006 12:15 pm
Forum: Volume 110 (11000-11099)
Topic: 11031 - Looking for a Subset
Replies: 24
Views: 17648

### I checked it...

Hello!

My AC program gives the same output, but there in your output is one extra space at every line. Maybe this is a reason of WA?..
Mon May 15, 2006 8:22 pm
Forum: Volume 110 (11000-11099)
Replies: 43
Views: 17412

### I'm sorry...

C wrote:There are 2 self numbers in segments[108,110], and they are 108 and 110
You are right! I missprinted:

there are no self numbers in intervals

(108, 110)
(1006, 1021)
(10004, 10032)
etc.

and 108, 110, 1006, 1021, 10004, 10032 are self numbers.

sorry...
Mon May 15, 2006 7:28 pm
Forum: Volume 110 (11000-11099)
Replies: 43
Views: 17412

### yes...

G(1017) = 9 + 9*11 + 9*101
but 1017 is not a self-number
so it should not be counted..

anyone could explain this ?
thanks a lot
There are no self numbers in segments:

[108, 110]
[1006, 1021]
[10004, 10032]
etc.
Mon May 15, 2006 9:30 am
Forum: Volume 110 (11000-11099)
Replies: 43
Views: 17412

### well...

Can you explain what do you mean? for calculate function fun(a,b) we can do next: precalculate array G[], where G = fun(0,i). Than fun(a,b) = G - G[a-1], if a <= b. If we see to this array we can do some conclusion about this numbers... For example G[27], G[35], G[99], G[143] we can evalute by next...
Sun May 14, 2006 11:26 pm
Forum: Volume 110 (11000-11099)
Replies: 43
Views: 17412

### Wow, AC in 0.010 sec :-)

Wow, AC in 0.010 sec

I so happy!!! I used the same that said Sedefcho. I spent all day to solve it . I think that we can find out formula or not complicated rule for function fun(0,a).

Thanks to Sohel Hafiz for this NICE problem
Sun May 14, 2006 12:21 pm
Forum: Volume 110 (11000-11099)
Replies: 43
Views: 17412

### Formula, hm...

I tried to take out a formula on contest. So, if we whant to know value fun( 0, a ) and a < 1000 , we can evalute it by next:

Code: Select all

``floor(a / 101) * 10 + floor( (a % 101) / 11 ) + 4``
But I had problems with numbers grater than 1000...
Any more ideas?
Sat May 13, 2006 7:51 pm
Forum: Volume 110 (11000-11099)
Replies: 43
Views: 17412

Hello, everybody!!!

How to solve this problem?

I think that we can optimize function fun(int a) by replacing line:

Code: Select all

`` for(i=1; i<=a; i++){``
to

Code: Select all

`` for(i=max(1, a-100); i<=a; i++){``
But what to do with fun(int a, int b) ???

Thanks, bye!
Mon Aug 08, 2005 6:08 pm
Forum: Volume 108 (10800-10899)
Topic: 10888 - Warehouse
Replies: 19
Views: 12672

### count B != cont X ???

It is very interesting question. There are nothing said in problem statement about this. But i tried to insert line like this in my code:

if (nb!=nx) a[-100000] = -1;

It will be get Runtime Error (SigSeg) or something this...

What algorithms you used, who get AC?

Tanks!