Search found 33 matches

by obayashi
Sat Oct 12, 2002 7:43 am
Forum: Volume 3 (300-399)
Topic: 325 - Identifying Legal Pascal Real Constants
Replies: 63
Views: 23721

thank u!!!
i found where the problem lies and fixed it.

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

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...
by obayashi
Sun Sep 01, 2002 3:32 pm
Forum: General
Topic: The problem with green colour ? What's it?
Replies: 1
Views: 1489

""....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...
by obayashi
Sat Aug 31, 2002 5:36 am
Forum: Volume 1 (100-199)
Topic: 166 - Making Change
Replies: 31
Views: 11038

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~ :P
by obayashi
Sat Aug 31, 2002 5:15 am
Forum: Volume 1 (100-199)
Topic: 166 - Making Change
Replies: 31
Views: 11038

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? :lol:
by obayashi
Sat Aug 31, 2002 5:10 am
Forum: Volume 1 (100-199)
Topic: 127 - "Accordian" Patience
Replies: 83
Views: 19461

thanx, problem solved.
i used pure c... :oops:
by obayashi
Sat Aug 31, 2002 5:09 am
Forum: Volume 1 (100-199)
Topic: 166 - Making Change
Replies: 31
Views: 11038

Code: Select all

dynamic programming
or

Code: Select all

branch and bound
by obayashi
Fri Aug 30, 2002 6:05 am
Forum: Volume 1 (100-199)
Topic: 188 - Perfect Hash
Replies: 9
Views: 7088

then waht if the words duplicates?

see example below

Code: Select all

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

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...
by obayashi
Wed Aug 28, 2002 5:34 am
Forum: Volume 5 (500-599)
Topic: 554 - Caesar Cypher
Replies: 27
Views: 14743

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 ...
by obayashi
Sat Aug 24, 2002 8:51 am
Forum: Volume 2 (200-299)
Topic: 218 - Moth Eradication
Replies: 60
Views: 18207

218 - Moth Eradication

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...
by obayashi
Wed Aug 21, 2002 3:15 am
Forum: Volume 2 (200-299)
Topic: 208 - Firetruck
Replies: 48
Views: 23305

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...
by obayashi
Tue Aug 20, 2002 1:21 pm
Forum: Volume 1 (100-199)
Topic: 184 - Laser Lines
Replies: 15
Views: 3752

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_...
by obayashi
Sun Aug 18, 2002 4:08 am
Forum: Volume 7 (700-799)
Topic: 758 - The Same Game
Replies: 7
Views: 5316

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.
by obayashi
Sat Aug 17, 2002 12:59 pm
Forum: Volume 102 (10200-10299)
Topic: 10261 - Ferry Loading
Replies: 41
Views: 25656

it's just a knap-sack like problem.
think it over and u will find what to do with this problem:)

good luck~

Go to advanced search