Search found 25 matches

by muvee
Fri Dec 24, 2004 1:38 am
Forum: Off topic (General chit-chat)
Topic: Bring back "View post from last 24 hours"
Replies: 6
Views: 3610

Hey larry.. If you really wanna help :) please check out this link and you've solved the problem, lemme know ...

http://online-judge.uva.es/board/viewtopic.php?t=7145
by muvee
Tue Dec 21, 2004 3:07 am
Forum: Volume 7 (700-799)
Topic: 704 - Colour Hash
Replies: 23
Views: 15906

704 - Colour Hash

Hello guys,

Ive been stumped on this problem for a few days now.

At first I thought I could do this with a bfs or dfs with the only pruning being that I don't do opposite operations in consecutive moves. Hence a 1 can only be followed by a 1,2 or 4 . Hence apart from the first move where there are ...
by muvee
Sat Dec 18, 2004 2:27 am
Forum: Volume 106 (10600-10699)
Topic: 10617 - Again Palindrome
Replies: 12
Views: 7334

No need now guys .. I found my mistake seconds after posting this.

For anybody who attempts this question in the future, you need to use long long !!
by muvee
Sat Dec 18, 2004 2:23 am
Forum: Volume 106 (10600-10699)
Topic: 10617 - Again Palindrome
Replies: 12
Views: 7334

10617.'Again Palindrome'.Output needed for following input

Hello guys.

If any of the 'Accepted' guys could give me their output for :


13
AMERFAZALRAHMAN
MIRANDA
GTAVICECITY
GRANDTHEFTAUTO
INTRODUCTIONTOALGORITHMSTHOMASCORMENCHARLESRONALDCLIFFORD
LOWPRICEEDITION
THECLASSICWORK
T
MSNMESSENGER
AAAAAAAA
AAAA
AAABBB
BBBAAA



174
10
35
40
637196
61
22
1
50 ...
by muvee
Wed Dec 15, 2004 2:17 pm
Forum: Volume 107 (10700-10799)
Topic: 10799 - OOPS! They did it Again...
Replies: 6
Views: 8599

And yet again my 'Wrong Answer' code matches the output of your 'Accepted' Code :( Any ideas anybody ?
by muvee
Tue Dec 14, 2004 11:00 pm
Forum: Volume 107 (10700-10799)
Topic: 10799 - OOPS! They did it Again...
Replies: 6
Views: 8599

Some more

Yes, I am printing case no number as well.

Please give me your output for this input :

Input :
1 20000000 5
19999999 20000000 2
5 18000000 15
10000000 15000000 23
0 0 0
Output:
Case 1: 49999990000000
Case 2: 0
Case 3: 11571414428574
Case 4: 568179545456

Thanks :)
by muvee
Tue Dec 14, 2004 9:39 pm
Forum: Volume 106 (10600-10699)
Topic: 10699 - Count the factors
Replies: 27
Views: 16530

nice!

Thanks Adrian

I incorporated that slick piece of info into my code and now I'm getting 0.006 with 64 mem usage. Then I changed my cout into printf and it further improved to 0.002 !! I guess I can improve that further if I improve my method of finding primes upto 1000 but 0.002 is good enough ...
by muvee
Tue Dec 14, 2004 8:38 pm
Forum: Volume 106 (10600-10699)
Topic: 10699 - Count the factors
Replies: 27
Views: 16530

10699 .. Count the factors... How in the world ??!?!

I've gotten "Accepted" with time of 0.6 s and 8864 of memory..
I thought this would be pretty good. When I open the ranklist, the first page is full of 0.00 guys !! How did you guys do it.

My Algo :

- Find all the primes upto 1000000
- For each number upto 1000000, find it's largest prime divisor ...
by muvee
Tue Dec 14, 2004 4:29 am
Forum: Volume 107 (10700-10799)
Topic: 10799 - OOPS! They did it Again...
Replies: 6
Views: 8599

10799 - OOPS! They did it Again...

Input :


3305 8222 2254
1510 14039 6367
7857 21363 6968
10161 21788 6611
21619 31536 8926
19741 22715 149
11927 31477 449
13566 28739 12976
6905 17289 5461
8449 28390 2879
1975 21504 5473
14812 19499 2857
14977 29571 3951
16700 19404 1516
12932 15078 1591
25400 25700 243
5357 9961 1786
6180 13887 ...
by muvee
Wed Dec 01, 2004 3:54 pm
Forum: Volume 107 (10700-10799)
Topic: 10780 - Again Prime? No Time.
Replies: 40
Views: 34635

Thanks Cho.

That is exactly what I did except I did it quite inefficiently!

Thanks again for all your help.
by muvee
Wed Dec 01, 2004 11:14 am
Forum: Volume 107 (10700-10799)
Topic: 10780 - Again Prime? No Time.
Replies: 40
Views: 34635

Thanks Cho! I got AC. I had made a couple of silly mistakes.

My AC has a time for 0.9 seconds.. I was wondering what yours was because I can see some people have done this problem in 0.02 seconds ! If yours is also low, can you please give me some hints on your algorithm?

Thanks.
by muvee
Tue Nov 30, 2004 11:09 pm
Forum: Volume 107 (10700-10799)
Topic: 10780 - Again Prime? No Time.
Replies: 40
Views: 34635

Here are some further test cases i ran it on.

Input:

50
104 6077
3074 4949
3539 4793
79 6508
3003 5955
2896 8979
2937 3527
629 2235
1017 1573
1844 6419
4911 3829
2041 2358
606 5888
4069 4074
2977 3994
4698 105
2318 8681
1061 7514
1959 4096
733 7567
2947 7851
4684 4680
269 9859
268 1860
2851 9715 ...
by muvee
Tue Nov 30, 2004 10:02 pm
Forum: Volume 107 (10700-10799)
Topic: 10780 - Again Prime? No Time.
Replies: 40
Views: 34635

10780 .. Again Prime? No Time.

I'm getting WA .. I've tested the test cases in another thread and they all work. Can you give you your output for these cases and if mine are all correct can you please suggest some other test cases. Thanks.

Input:

7
4500 3
3 4500
4999 9999
2 9999
2 2
5 5
10 10



Output:

Case 1:
Impossible ...
by muvee
Thu Nov 04, 2004 2:47 am
Forum: Volume 107 (10700-10799)
Topic: 10710 - Chinese Shuffle
Replies: 19
Views: 6779

10710

My evidently pathetic algorithm that takes about 5 seconds on certain cases is as follows :

Let the input number be N

1) If N is odd , N=N+1
2) Set x = 2 and counter=1
While(x!=1)
{
x = (x<<1)%(n-1)
counter++
}




This is based on the observation that if you label the cards from 0 to n-1 ...
by muvee
Tue Nov 02, 2004 1:25 am
Forum: Volume 107 (10700-10799)
Topic: 10721 - Bar Codes
Replies: 26
Views: 16767

That's it??!?!?!

And here I am doing it in such a complex way. I got every single valid sequence and then found all the combinations/permutations (never knew the difference :D ) of them...

Go to advanced search