Search found 163 matches

by Emilio
Mon Sep 26, 2005 8:56 pm
Forum: Volume 108 (10800-10899)
Topic: 10831 - Gerg's Cake
Replies: 13
Views: 5568

Thanks Martin Macko! I got AC. I had a small bug at my algorithm. But one question, I have obtained a time of 0:00.535, and most of solvers have obtained a time about 0:00.030 or smaller, I would like know the method used. I used a method that is about Legendre's symbol and law of quadratic reciproc...
by Emilio
Mon Sep 26, 2005 12:46 am
Forum: Volume 108 (10800-10899)
Topic: 10831 - Gerg's Cake
Replies: 13
Views: 5568

Hello and thanks mf! I have used Legendre's symbol, and get correct output for all the input of this thread. Maybe I haven't computed right Legendre's symbol. If someone can explain me a bit how have computed this to solve the problem, I will be happy :D By other hand I have here some test cases, if...
by Emilio
Sun Sep 25, 2005 9:15 pm
Forum: Volume 108 (10800-10899)
Topic: 10802 - Lex Smallest Drive
Replies: 36
Views: 14422

Hello StatujaLeha!

You must consider
for all i from 2 up to k-1, vi-1 is not equal to vi+1
by Emilio
Tue Sep 20, 2005 9:04 pm
Forum: Volume 108 (10800-10899)
Topic: 10831 - Gerg's Cake
Replies: 13
Views: 5568

Hello! Only one question? Could anyone say me what is wrong in my code? #include <iostream> using namespace std; main () { long long a, p, x, sq; while (cin >> a >> p && (a!=-1 || p!=-1)) { x=a%p; sq=0; while (sq*sq<x) sq++; if (sq*sq==x) cout << "Yes\n"; else cout << "No\n"; } } Any test cases will...
by Emilio
Tue Sep 13, 2005 1:38 am
Forum: Volume 7 (700-799)
Topic: 799 - Safari Holiday
Replies: 13
Views: 8723

Why do you think it's a necessary condition?
The reason is that I thought too quickly :D

I got AC.

Thanks mf!
by Emilio
Mon Sep 12, 2005 2:50 am
Forum: Volume 7 (700-799)
Topic: 799 - Safari Holiday
Replies: 13
Views: 8723

Hi there! First, this is the problem where I have obtained more WA and RE. I'm really desperate. I describe my algorithm here: for each case if kmax >= n => solution found, next case; for k=kmax to 2 if n mod k == 0 if combinations_n_elements_k_at_time mod (n/k) == 0 => solution found, next case; No...
by Emilio
Wed Aug 31, 2005 8:07 pm
Forum: Volume 108 (10800-10899)
Topic: 10886 - Standard Deviation
Replies: 8
Views: 4960

Thanks sunnycare!

I have got AC!

I could have made a force brute program to check my output.
Sometimes I seem stupid.
by Emilio
Sun Aug 28, 2005 3:50 am
Forum: Volume 108 (10800-10899)
Topic: 10886 - Standard Deviation
Replies: 8
Views: 4960

Hi! Could anyone confirm this test cases? And, if is possible, could anyone post any cases more? Thanks! input: 41 2 16777216 2 4294967296 10000000 0 2 2147483648 10000 382759482784958 2 16777216 2 4294967296 10000000 0 2 2147483648 10000000 382759482784958 10000000 100012312311 123478 1238491234923...
by Emilio
Fri Aug 12, 2005 11:14 pm
Forum: Volume 108 (10800-10899)
Topic: 10887 - Concatenation of Languages
Replies: 49
Views: 18133

I parse the input in the same form as you.
And I got AC.
I think that is not your problem :D
by Emilio
Fri Aug 12, 2005 11:03 pm
Forum: Volume 4 (400-499)
Topic: 433 - Bank (Not Quite O.C.R.)
Replies: 18
Views: 2530

Thanks a lot Jan.

In one second was solved. I only needed delete a part of a line. I think that a bad understanding or I don't know why was doing that in my code. :D

Thanks a lot another time!!!
by Emilio
Fri Aug 12, 2005 2:58 pm
Forum: Volume 4 (400-499)
Topic: 433 - Bank (Not Quite O.C.R.)
Replies: 18
Views: 2530

Hi Jan,

I can't encounter any bug. I have tested my code with your test case and my output is correct.

I post here my code.
If anyone can say me what is my bug, I will be very grateful.

Code: Select all

CUT
Thanks
by Emilio
Fri Aug 12, 2005 2:39 pm
Forum: Volume 8 (800-899)
Topic: 842 - Crossword Puzzles
Replies: 6
Views: 2700

Thanks artem.

This do seem that my approach is wrong. I will see it when I have a bit of free time.

Thanks another time.
by Emilio
Tue May 31, 2005 9:48 pm
Forum: Volume 5 (500-599)
Topic: 551 - Nesting a Bunch of Brackets
Replies: 56
Views: 11589

"you must print the number of chars+1" ?! I only refer to the examples that you have posted. If the expression is not properly nested your program should determine the position of the offending bracket, that is the length of the shortest prefix of the expression that can not be extended to a proper...
by Emilio
Mon May 30, 2005 10:29 pm
Forum: Volume 108 (10800-10899)
Topic: 10854 - Number of Paths
Replies: 25
Views: 8858

:oops: you are right!

Sorry by the fault!
by Emilio
Mon May 30, 2005 9:58 pm
Forum: Volume 5 (500-599)
Topic: 551 - Nesting a Bunch of Brackets
Replies: 56
Views: 11589

Hi!
When the answer is "No" you must print the number of chars+1, (remember that (* and *) is only a char), I think that one of yours faults is that you counter [* and *] as one char but only (* and *) are one char.

Hope it help!

Go to advanced search