Search found 8 matches

by ivec
Fri Aug 08, 2003 12:03 am
Forum: Volume 3 (300-399)
Topic: 358 - Don't Have A Cow
Replies: 52
Views: 10568

I have the same output as IIUC GOLD, but still WA. I believe I am handling the multiple input correctly (I have a bunch of assertions to validate input and check there is no trailing data). It feels like this is one of these numeric error / rounding problems. I used some classig geometry and trigono...
by ivec
Sat Jul 12, 2003 4:35 am
Forum: Volume 1 (100-199)
Topic: 174 - Strategy
Replies: 8
Views: 4076

test case provided is ok for 174

my AC prog generates the same output from the sample cases you provided. Doesn't mean the program is correct though... for instance, there could be less than 10 strategies in the input. I solved this problem by building a decision tree from the program, using something like: [c] typedef enum { cNull...
by ivec
Tue Jul 01, 2003 11:18 pm
Forum: Volume 1 (100-199)
Topic: 159 - Word Crosses
Replies: 32
Views: 3357

Technical suggestion to C/C++ coders working on #159

I see a lot of complicated output code in this thread. You may want to consider the following formatting string for printf: printf("%*c\n", col_index , c ); This prints character 'c' in column 'col_index' after the current position, by inserting leading spaces. The * instructs the formatter to pick ...
by ivec
Sat Jun 28, 2003 12:42 am
Forum: Volume 1 (100-199)
Topic: 140 - Bandwidth
Replies: 49
Views: 7315

140 - Bandwidth

I had no luck on this one so far... first problem I seem to stumble on. What would be a good approach? Googling lead me to consider some "cuthill-mckee" algorithm, but I haven't been able to find a description of that algorithm online. Does anyone have such a description ? Also, I'm not sure if the ...
by ivec
Mon Jun 23, 2003 4:46 pm
Forum: Volume 1 (100-199)
Topic: 137 - Polygons
Replies: 44
Views: 3663

hints for 137

The idea is to find all intersections between segments of each polygon. There is an O(N) way to do it ( "rotating calipers" ). But for this problem, the O(N2) brute-force approach (testing all segment pairs) will do. When calculating intersections, also make sure to store the direction of the crossi...
by ivec
Mon Jun 09, 2003 12:47 pm
Forum: Volume 1 (100-199)
Topic: 116 - Unidirectional TSP
Replies: 226
Views: 35351

sorry, was far-fetched stuff...

I got AC, and it appears that the correct sequence is:
2 1 2 1 1 1 1 1 1

Sorry, the WA got me wandering, while I just failed to handle 1-row matrices correctly.

But having the alphabetically smallest sequence was a nice exercice
:wink:
by ivec
Mon Jun 09, 2003 12:38 pm
Forum: Volume 1 (100-199)
Topic: 116 - Unidirectional TSP
Replies: 226
Views: 35351

pb 116 Unidirectional TSP -- what lexicographic order?

I'm hitting WA on 116, and have doubts on what the lexicographic order is supposed to be. Could someone with AC let me know what is the correct output for the following input ? [quote] 10 9 2 1 2 1 1 1 1 1 2 1 2 1 2 1 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...
by ivec
Sun Jun 08, 2003 3:26 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 180054

Input and output may overlap

You probably should look for a problem elsewhere.

Have you considered inputs such as:
5 8
8 5
?


hth,
Ivan

Go to advanced search