Search found 34 matches

by paulmcvn
Mon Sep 10, 2007 9:46 am
Forum: Bugs and suggestions
Topic: Searching for problems
Replies: 2
Views: 1647

Searching for problems

I think there should be a box to enter problem id and going directly through a problem. Also, there should be a list of already solved problems.
by paulmcvn
Sun Sep 09, 2007 1:36 pm
Forum: Volume 101 (10100-10199)
Topic: 10137 - The Trip
Replies: 159
Views: 45210

Yep, I've just got AC although my program outputs $0.00 for the above case!

So what is the correct algorithm?
by paulmcvn
Sun Sep 09, 2007 12:20 pm
Forum: Algorithms
Topic: Input / output problem
Replies: 1
Views: 1426

Input / output problem

Can someone explain me why there are some problems that i got wa with
while not eof
but got accepted when changing to
while not seekeof

What's equivalent in C++?
by paulmcvn
Sun Sep 09, 2007 12:18 pm
Forum: Volume 112 (11200-11299)
Topic: 11269 - Setting Problems
Replies: 26
Views: 10809

Ohh... i changed it to pascal
and when changing
while not eof
to
while not seekeof
it got accept
What's equivalent in C++?
Can someone explain me why?
by paulmcvn
Sun Sep 09, 2007 11:45 am
Forum: Volume 112 (11200-11299)
Topic: 11269 - Setting Problems
Replies: 26
Views: 10809

Still correct and still got WA :-(
I tried while (cin >> n) also
by paulmcvn
Sat Sep 08, 2007 5:11 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 78463

I think this is so simple but still got WA... #include <iostream> #include <cmath> using namespace std; int main() { freopen(FIN, "r", stdin); freopen(FOUT, "w", stdout); int n, truoc, sau, co[3010]; while (1) { cin >> n; if (cin.eof()) break; memset(&co, false, sizeof(co)); cin >> truoc; for (int i...
by paulmcvn
Sat Sep 08, 2007 4:30 pm
Forum: Volume 112 (11200-11299)
Topic: 11269 - Setting Problems
Replies: 26
Views: 10809

My above program outputs it correctly :(
by paulmcvn
Sat Sep 08, 2007 7:16 am
Forum: Volume 112 (11200-11299)
Topic: 11269 - Setting Problems
Replies: 26
Views: 10809

Some test cases please, I cannot find what is wrong with my solution!

My implementation:
Sort tasks accroding to min(s, g)
for i=0 -> n-1
if (min(s, g = s)
add task i to the end of list A
else
add task i to begin of list B
merge A B

Thank you!
by paulmcvn
Sat Sep 08, 2007 7:13 am
Forum: Volume 101 (10100-10199)
Topic: 10137 - The Trip
Replies: 159
Views: 45210

I got WA many times for this problem and quite dont understand why After that, I found this on alogrithmist.com: " Calculate the average expenditure and round it to two decimal places. (You'll need to write your own rounding function). Now the expenditure can be equalized in two ways. First, by addi...
by paulmcvn
Fri Sep 07, 2007 4:31 am
Forum: Volume 112 (11200-11299)
Topic: 11269 - Setting Problems
Replies: 26
Views: 10809

Can anyone give me some test cases? I use Johnson, but it got WA. Here is my code: #include <iostream> //#include <conio.h> using namespace std; #define FIN "" //"11269.in" #define FOUT "" //"11269.out" int n, s[25], g[25], lich[25], dau, cuoi; int main() { freopen(FIN, "r", stdin); freopen(FOUT, "w...
by paulmcvn
Mon Jan 22, 2007 4:03 pm
Forum: Volume 111 (11100-11199)
Topic: 11164 - Kingdom Division
Replies: 6
Views: 3078

Could you give me an idea for this problem?
by paulmcvn
Mon Jan 22, 2007 4:02 pm
Forum: Volume 111 (11100-11199)
Topic: 11163 - Jaguar King
Replies: 17
Views: 10285

11163 - Jaguar King

Could anyone give me an idea for this problem?
by paulmcvn
Mon Jan 22, 2007 1:15 pm
Forum: Volume 111 (11100-11199)
Topic: 11158 - Elegant Permuted Sum
Replies: 23
Views: 14976

Sorry, you're right!

Just notice the case when there's one last number in A.
by paulmcvn
Mon Jan 22, 2007 11:47 am
Forum: Volume 111 (11100-11199)
Topic: 11158 - Elegant Permuted Sum
Replies: 23
Views: 14976

Your approach is wrong for test 8 above.
by paulmcvn
Sun Jan 21, 2007 7:37 am
Forum: Volume 111 (11100-11199)
Topic: 11155 - Be Efficient
Replies: 15
Views: 10383

:wink:

Go to advanced search