## Search found 33 matches

Sat Oct 12, 2002 7:43 am
Forum: Volume 3 (300-399)
Topic: 325 - Identifying Legal Pascal Real Constants
Replies: 63
Views: 15677
thank u!!!
i found where the problem lies and fixed it.

"1" is not a real constant...
Tue Sep 17, 2002 8:03 am
Forum: Volume 3 (300-399)
Topic: 325 - Identifying Legal Pascal Real Constants
Replies: 63
Views: 15677

### 325 DFA? WHY WA?

It's just a simple DFA problem but the judge gave me WA. Please help me. #include <iostream> using namespace std; char str[1000]; int trans[8][4] = { {1,2,9,9}, {9,2,9,9}, {9,2,3,5}, {9,4,9,9}, {9,4,9,5}, {6,7,9,9}, {9,7,9,9}, {9,7,9,9} }; int getMap (char c) { switch (c) { case '+': case '-': retur...
Sun Sep 01, 2002 3:32 pm
Forum: General
Topic: The problem with green colour ? What's it?
Replies: 1
Views: 1085
""....a special judge program."" I don't understand......What?? some problem may produce many best solutions and any one would be accepted. so judging the answer requires a special program , not doing simple text comparison or stream comparison. and also, some problem are really NP problems, it's e...
Sat Aug 31, 2002 5:36 am
Forum: Volume 1 (100-199)
Topic: 166 - Making Change
Replies: 31
Views: 6273

Code: Select all

``````for
for
for {

}

eg. the Floyd algorithm is a typical/classic 3D DP :lol:
``````
and there's some way to convert recursion to iteration(dp)
such as matrix chain multipulation (problem 348, i used both recursion and iteration)...

good luck~
Sat Aug 31, 2002 5:15 am
Forum: Volume 1 (100-199)
Topic: 166 - Making Change
Replies: 31
Views: 6273
usually such program can be solved by 2 or 3 dimension DP.

but i use recursion and branch and bound.
to search for the result, the upper bound will descend step by step while program recurses... so the total search amount won't be large.

get it?
Sat Aug 31, 2002 5:10 am
Forum: Volume 1 (100-199)
Topic: 127 - "Accordian" Patience
Replies: 83
Views: 10144
thanx, problem solved.
i used pure c...
Sat Aug 31, 2002 5:09 am
Forum: Volume 1 (100-199)
Topic: 166 - Making Change
Replies: 31
Views: 6273

Code: Select all

``````dynamic programming
``````
or

Code: Select all

``````branch and bound
``````
Fri Aug 30, 2002 6:05 am
Forum: Volume 1 (100-199)
Topic: 188 - Perfect Hash
Replies: 9
Views: 5318
then waht if the words duplicates?

see example below

Code: Select all

``````aaa bbb bbb ccc ccc
``````
Thu Aug 29, 2002 5:35 am
Forum: Volume 1 (100-199)
Topic: 127 - "Accordian" Patience
Replies: 83
Views: 10144

### p127 why TLE?

:cry: i don't think my code will gimme TLE... any one help pls thx in advance [cpp] #include <iostream> #include <string.h> #include <list> using namespace std; typedef struct { char c[2]; } card_t; typedef struct { list<card_t> card; } stack_t; list<stack_t> li; char str[1000],tmp[1000],*p; bool in...
Wed Aug 28, 2002 5:34 am
Forum: Volume 5 (500-599)
Topic: 554 - Caesar Cypher
Replies: 27
Views: 10928
i got AC (not PE). there's a trick. if your output have linewraps, you should omit leading blanks in the following line. [cpp] eg. bla bla XXXX...XXXXXX bla bla bla <-- then linewrap bla bla ... <-- the following line may has leading blanks, just leave out the blanks like this bla bla XXXX...XXXXXX ...
Sat Aug 24, 2002 8:51 am
Forum: Volume 2 (200-299)
Replies: 60
Views: 11313

i try to use graham scan to solve this prob. but get WA... any one help pls. thx in advance [cpp] #include <iostream> #include <memory.h> #include <stdlib.h> #include <math.h> using namespace std; const int MAX_PT = 2000; typedef struct { double x,y; } point_t; point_t pt[MAX_PT]; int st[MAX_PT]; in...
Wed Aug 21, 2002 3:15 am
Forum: Volume 2 (200-299)
Topic: 208 - Firetruck
Replies: 48
Views: 16068
i got TLE too with this problem at first. my friend gave me some hints.
first, use floyd or warshall to determine whether the node is reachable to the destination while using dfs... then i got AC...
Tue Aug 20, 2002 1:21 pm
Forum: Volume 1 (100-199)
Topic: 184 - Laser Lines
Replies: 15
Views: 2277

### 184 help~~~~

i cannot find the problem with my code~ [cpp] #include <iostream> #include <iomanip> #include <memory.h> #include <stdlib.h> #include <math.h> typedef struct { int x,y; } point_t; point_t pt[300]; int num,used[300][300]; const double VERT = 1e30; inline int cmp (const void *a,const void *b) { point_...
Sun Aug 18, 2002 4:08 am
Forum: Volume 7 (700-799)
Topic: 758 - The Same Game
Replies: 7
Views: 3915
i know that, but thank you all the same.

this problem is collected out from ICPC 1999 NW Pacific Region, and i think it worth doing, but i kept wrong answer with it...

i wanna know if there is a standard and common simple solution for such "same game" problems.
Sat Aug 17, 2002 12:59 pm
Forum: Volume 102 (10200-10299)