Search found 216 matches

by Moha
Wed Aug 23, 2006 5:36 pm
Forum: Algorithms
Topic: help to solve problem
Replies: 4
Views: 1752

With Binary search tree we can design a mechanism to achieve a solution with order O(nlogn)
by Moha
Tue Aug 22, 2006 2:20 am
Forum: C++
Topic: string in STL
Replies: 2
Views: 1887

because scanf wants to see the name as a simple char* ! and it is not possible.
read a string with cin or getline instead of scanf
by Moha
Mon Aug 21, 2006 1:23 am
Forum: Volume 109 (10900-10999)
Topic: 10985 - Rings'n'Ropes
Replies: 11
Views: 4225

[Edited] I got it! and I am 3rd on the rank!
by Moha
Mon Aug 21, 2006 12:02 am
Forum: C++
Topic: C++ language and <ios> include file
Replies: 6
Views: 4758

for UVA you should use cout.setf(ios::fixed) and cout.precision(3).
by Moha
Sun Aug 20, 2006 12:50 am
Forum: Volume 7 (700-799)
Topic: 739 - Soundex Indexing
Replies: 39
Views: 13479

Please remove your code now!
by Moha
Sat Aug 19, 2006 2:08 am
Forum: Volume 100 (10000-10099)
Topic: 10023 - Square root
Replies: 121
Views: 26373

Use this thread http://online-judge.uva.es/board/viewto ... ight=10023
and please do not create a new thread on existing topics!
by Moha
Sat Aug 19, 2006 2:05 am
Forum: C++
Topic: access to a vector witout ->at() function;
Replies: 5
Views: 2712

at function is slow! because it checkes the index! use iterators or [] instead
by Moha
Wed Aug 16, 2006 12:57 am
Forum: Algorithms
Topic: Magic Square
Replies: 1
Views: 1126

Search in google! or mathworlds!
by Moha
Tue Aug 15, 2006 12:02 am
Forum: Volume 109 (10900-10999)
Topic: 10923 - Seven Seas
Replies: 28
Views: 11507

I got it at last. I did a very nasty mistake in my dfs function. anyway, this is a very simple problem, so a simple dfs is enough, also I think this problem has so many vagueness because I got it with different answers for the posted testcases, especially for my own testcases.
by Moha
Mon Aug 14, 2006 11:57 pm
Forum: Volume 102 (10200-10299)
Topic: 10202 - Pairsumonious Numbers
Replies: 10
Views: 5364

A hint in backtracking approach? you can always assume that the first number is 0 and the last one is the largest one. So we need to find out the others. a simple backtraking method is select the numbers from the given numbers and check all of pairs if they make a solution. A hint for another soluti...
by Moha
Sun Aug 13, 2006 8:29 pm
Forum: Volume 100 (10000-10099)
Topic: 10079 - Pizza Cutting
Replies: 44
Views: 9675

There is no diffrence between 0.500000000000 and 0.499999999999 but when you want to cast it to int the problems arises. Moreover the final results may become rational number so avoid this methods in the integer computation.
by Moha
Sun Aug 13, 2006 8:16 pm
Forum: Volume 102 (10200-10299)
Topic: 10202 - Pairsumonious Numbers
Replies: 10
Views: 5364

I use backtracking approach, but I think there is a good solution for this problem without backtracking. I guess this from the ranklist!
by Moha
Sun Aug 13, 2006 8:13 pm
Forum: Algorithms
Topic: need problem number
Replies: 2
Views: 1356

There are so many threads in this topic(just DP problems).
Instead of making a new one, you can search in the froum. also you can use http://www.shygypsy.com it has a very good classification. try it!
by Moha
Sat Aug 12, 2006 9:40 pm
Forum: C++
Topic: Strange OJ Compiler Message
Replies: 2
Views: 1557

During the contest, they don't tell you the exact compile error message!
so all the CE will get no such a file or directory! the message when you run then gcc without any film to compile!
by Moha
Thu Aug 10, 2006 2:16 pm
Forum: Volume 109 (10900-10999)
Topic: 10923 - Seven Seas
Replies: 28
Views: 11507

Could anyone test these testcases? 13 .#...... .#...##. .#...##. .#..S##. .####E#. ......#. ......#. ..#####. ........ S#E..... ........ ........ ........ ........ ........ ........ ........ ........ S####### ######## ######## ######## ######## ######## ######## ######## EEEEEEEE ........ ........ ....

Go to advanced search