Search found 24 matches

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

Re: 11467 - Pythagorean Triangles

My AC program gives the same answer except two last.

My answer for two last is:

1999
95302811479600

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

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...
by Victor Barinov
Sat Jul 12, 2008 11:00 pm
Forum: Volume 114 (11400-11499)
Topic: 11466 - Largest Prime Divisor
Replies: 29
Views: 15187

Re: 11466 - Largest Prime Divisor

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

Oh!

"...and start with the same letter than w"

((( now I understand my mistake.


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

Yes
by Victor Barinov
Sat May 19, 2007 2:57 pm
Forum: Volume 112 (11200-11299)
Topic: 11201 - The problem of the crazy linguist
Replies: 21
Views: 9513

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?
by Victor Barinov
Sun Jul 23, 2006 6:14 pm
Forum: Volume 110 (11000-11099)
Topic: 11054 - Wine trading in Gergovia
Replies: 25
Views: 6439

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...
by Victor Barinov
Sat May 20, 2006 12:15 pm
Forum: Volume 110 (11000-11099)
Topic: 11031 - Looking for a Subset
Replies: 24
Views: 17022

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?..
by Victor Barinov
Mon May 15, 2006 8:22 pm
Forum: Volume 110 (11000-11099)
Topic: 11032 - Function Overloading
Replies: 43
Views: 16481

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...
by Victor Barinov
Mon May 15, 2006 7:28 pm
Forum: Volume 110 (11000-11099)
Topic: 11032 - Function Overloading
Replies: 43
Views: 16481

yes...

lonelyone wrote:but how about 1017
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. :-)
by Victor Barinov
Mon May 15, 2006 9:30 am
Forum: Volume 110 (11000-11099)
Topic: 11032 - Function Overloading
Replies: 43
Views: 16481

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...
by Victor Barinov
Sun May 14, 2006 11:26 pm
Forum: Volume 110 (11000-11099)
Topic: 11032 - Function Overloading
Replies: 43
Views: 16481

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 :-)
by Victor Barinov
Sun May 14, 2006 12:21 pm
Forum: Volume 110 (11000-11099)
Topic: 11032 - Function Overloading
Replies: 43
Views: 16481

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?
by Victor Barinov
Sat May 13, 2006 7:51 pm
Forum: Volume 110 (11000-11099)
Topic: 11032 - Function Overloading
Replies: 43
Views: 16481

11032 - Function Overloading

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!
by Victor Barinov
Mon Aug 08, 2005 6:08 pm
Forum: Volume 108 (10800-10899)
Topic: 10888 - Warehouse
Replies: 19
Views: 12101

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!

Go to advanced search