Search found 183 matches

by Eduard
Tue Feb 08, 2005 4:36 pm
Forum: Volume 100 (10000-10099)
Topic: 10081 - Tight Words
Replies: 16
Views: 6285

Here are some tests.
Input

Code: Select all

0 8
5 10
2 20
2 30
2 40
2 50
2 60
2 70
9 13
Output

Code: Select all

100.00000
0.09657
1.56615
0.17839
0.02032
0.00231
0.00026
0.00003
0.00012
by Eduard
Tue Feb 08, 2005 1:24 pm
Forum: Volume 5 (500-599)
Topic: 539 - The Settlers of Catan
Replies: 22
Views: 8175

Hello New(User)
You have some mistakes in your code.
AT first after reading make n:=n-1.Then clean your mat array after each test case.In procedure DF make j:=0 to n do.
And you will get AC.If you will have WA tell me.
Eduard
by Eduard
Mon Feb 07, 2005 12:32 pm
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 21790

Hello ioriyagami. Lets initial cat hight be P.There is some number N(wich is not given) that each cat have N small cats in his hat.And each cat in hat of biggest cat has hight p/(N+1).It means that cat in hat of cat wich is in hat of biggest cat will have hight p/(n+1)^2.And so one until hight=1. Ed...
by Eduard
Sat Feb 05, 2005 3:51 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 189271

Hello carping.
If problem doesn't tell you when does input ends you must read while not end of file.
For C++ you can read for example in such way if you use iostream.

Code: Select all

While (cin >> a >> b)
{
// your solution //
}
or

Code: Select all

While (true) {
cin >> a >> b;
// Your solution //
}
Eduard
by Eduard
Wed Feb 02, 2005 6:11 pm
Forum: Volume 100 (10000-10099)
Topic: 10054 - The Necklace
Replies: 62
Views: 32004

10054-The Neacklace

I'm getting WA 10054.
My algo is as follows.
1.Check if there isn't any vertex with odd degree.
2.Check if graph is connected or not.
3.Find euler cycle.
Please give me some tests or some hints.And if someone can give some other Euler cycle problems.
Thanks
Eduard.
by Eduard
Wed Feb 02, 2005 1:58 pm
Forum: Volume 3 (300-399)
Topic: 384 - Slurpys
Replies: 8
Views: 1948

Thanks I got AC. :P
by Eduard
Tue Jan 25, 2005 11:25 pm
Forum: Volume 8 (800-899)
Topic: 884 - Factorial Factors
Replies: 49
Views: 27456

Hello.
My algo is as fallows.I find all prime numbers in range 1..1000000(Sieve).
For all K(prime numbers in range 2..n) s+=n/k+n/k^2+n/k^3...
This work fast for test n=1000000 but for 100 such tests it works slow.
Please someone explain me some other more faster algo.
Thanks.
by Eduard
Sun Jan 23, 2005 2:47 pm
Forum: Volume 3 (300-399)
Topic: 384 - Slurpys
Replies: 8
Views: 1948

WA 384 Slurpys

I'm getting 384 problem WA.I recursivly check if word is slim,slump.
CHeck my code please or give some I/O. Thanks.

Code: Select all

 ---- Got AC--
by Eduard
Tue Jan 18, 2005 6:30 pm
Forum: Volume 1 (100-199)
Topic: 117 - The Postal Worker Rings Once
Replies: 58
Views: 16675

I find my little mistake and got AC. :D
by Eduard
Tue Jan 18, 2005 4:32 pm
Forum: Volume 1 (100-199)
Topic: 117 - The Postal Worker Rings Once
Replies: 58
Views: 16675

Ok Sohel.
My algo.
Vertexes of graph are letters 'a'..'z'.Let K be number of vertexes wich have odd nodes.
if k=0 then answer=sum length(of all words).
k can't be 1!
if k=2 then answer=sum length(of all words)+shortest path from one odd vertex to another.
Eduard
by Eduard
Fri Jan 14, 2005 3:13 pm
Forum: Volume 1 (100-199)
Topic: 117 - The Postal Worker Rings Once
Replies: 58
Views: 16675

117 WA

I'm gettin 117 WA.Give some tests please.
Thanks.
by Eduard
Fri Jan 14, 2005 3:04 pm
Forum: Volume 108 (10800-10899)
Topic: 10803 - Thunder Mountain
Replies: 47
Views: 24003

I got AC.Don't need test data. :D
Eduard.
by Eduard
Fri Jan 14, 2005 12:55 pm
Forum: Volume 108 (10800-10899)
Topic: 10803 - Thunder Mountain
Replies: 47
Views: 24003

Hello.
I'm getting this problem WA.Somebody give me some tests please.
Thanks.
by Eduard
Thu Jan 13, 2005 9:01 pm
Forum: Volume 108 (10800-10899)
Topic: 10800 - Not That Kind of Graph
Replies: 48
Views: 22205

Ok I find my mistake and got AC.
Eduard.
by Eduard
Thu Jan 13, 2005 8:24 pm
Forum: Volume 108 (10800-10899)
Topic: 10800 - Not That Kind of Graph
Replies: 48
Views: 22205

Thanks sidky for your reply.My program is giving same answer to these inputs, also for your input,but I'm still getting WA.May be you can give some more tests?
Thanks.

Go to advanced search