## Search found 32 matches

Sun Feb 12, 2006 6:15 am
Forum: Volume 109 (10900-10999)
Topic: 10992 - The Ghost of Programmers
Replies: 36
Views: 17516
i think during contest you had to write the last blank line if you wanted it to be AC. That's why most submitters got PE, because the submitted the code written during contest
Mon Feb 06, 2006 1:17 pm
Forum: Volume 109 (10900-10999)
Topic: 10923 - Seven Seas
Replies: 28
Views: 11687
Your CE is because sort takes as third parameter a StrictWeakOrdering object. See http://www.sgi.com/tech/stl/sort.html for more info. In your case you should use something like this struct Comparator{ bool operator()(const GridCond &a, GridCond &b){ if(a<b)return true; else return false; } }; and w...
Mon Feb 06, 2006 9:41 am
Forum: Other words
Topic: Can you give me numbers of some max-flow problems in UVA?
Replies: 2
Views: 1767
http://shygypsy.com/acm/cgi-bin/grepplu ... &nohints=1

In general you can use this script from Abednego http://shygypsy.com/acm/ (the grep+ script)
Wed Jan 11, 2006 10:31 pm
Forum: Algorithms
Topic: angle
Replies: 1
Views: 724
it's easy, take the dot-product of the two vectors that define the three points. Let's say you have A,B and C. Just calculate AB
Mon Jan 02, 2006 1:28 am
Forum: Volume 109 (10900-10999)
Topic: 10979 - How Many Triangles?
Replies: 15
Views: 6114
try this case..

Code: Select all

``````9
0 0 1 1
1 1 2 2
2 2 3 3
0 0 1 0
1 0 2 0
2 0 3 0
3 0 3 1
3 1 3 2
3 2 3 3
``````
Output is 1. If it doesnt work my tip is to rewrite the solution, you may catch something wrong
Sat Dec 31, 2005 3:58 pm
Forum: Volume 109 (10900-10999)
Topic: 10979 - How Many Triangles?
Replies: 15
Views: 6114
i created 1000 tests cases with the same program that i used in the cases posted before. I uploaded them here
Sat Dec 31, 2005 3:51 pm
Forum: Volume 109 (10900-10999)
Topic: 10979 - How Many Triangles?
Replies: 15
Views: 6114
How do you check if they are colinear? There are a lot of cases that you should consider depending of each method. Suerte!
Fri Dec 30, 2005 8:30 pm
Forum: Volume 109 (10900-10999)
Topic: 10981 - String Morphing
Replies: 31
Views: 13404
amazingly it can be solved backtracking! But of course, do a little bit of prunning
Thu Dec 29, 2005 5:29 pm
Forum: Volume 109 (10900-10999)
Topic: 10979 - How Many Triangles?
Replies: 15
Views: 6114
Your output is OK. I used double and had no problem with it. Try these cases 10 6 12 -19 -5 14 9 -23 -23 7 9 -10 -10 6 12 -6 -16 20 7 -12 -21 16 -9 -7 18 17 -7 -6 21 23 -20 -12 11 16 -23 -14 17 12 -24 -20 19 10 8 16 -7 -18 18 9 -6 -16 18 13 -12 -9 7 22 -22 -24 8 6 -14 -23 21 -20 -15 7 13 -11 -5 7 9 ...
Sat Nov 05, 2005 7:17 pm
Forum: Volume 100 (10000-10099)
Topic: 10098 - Generating Fast
Replies: 62
Views: 13734
I don
Thu Nov 03, 2005 10:40 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 180073
On this online judge you are not allowed to use any function that opens a file. Every kind of input/output must go through the normal stdin. In your case you should just include iostream and change the "input"s for "cin"s and the "output"s for "cout"s and of course erase the lines ifstream input("in...
Wed Nov 02, 2005 9:52 am
Forum: Volume 109 (10900-10999)
Topic: 10957 - So Doku Checker
Replies: 31
Views: 14946
My ACed program outputs the same, it should be then a corner case. Post the code if you dont find it!
Sun Oct 30, 2005 2:13 pm
Forum: Volume 109 (10900-10999)
Topic: 10953 - Stochastic Digit Generator
Replies: 17
Views: 5983
You have to use DP. Think about how you can use it!
Sun Oct 30, 2005 12:58 pm
Forum: Volume 109 (10900-10999)
Topic: 10954 - Add All
Replies: 80
Views: 27483
Also you can use multiset
Sun Oct 30, 2005 3:53 am
Forum: Volume 109 (10900-10999)
Topic: 10953 - Stochastic Digit Generator
Replies: 17
Views: 5983
i mean, ill send it for viewing this issue, not for helping others to get WA. If you need help on this problem, ask for it and i will answer!