2011年3月19日 星期六

[UVa]10010:Where's Waldorf?

這題要注意的有幾個點:
1.尋找字串的時候雖然有八方位,
但是凡決定要走哪個方位後,
就只能朝著同一個方位走,
不能彎來彎去。
2.字母相等不分大小寫。
3.要以左上方為優先,
就要以斜線的方法來定X和Y,
相信被8皇后題目訓練過,
就會知道要用X+Y來搜尋XD

[C](0.008)

5 則留言:

  1. Thanks very much. But I write my Java version,
    the online judge system always tells me "Wrong Answer". However yours is pass. Even the output generated by ours' source code is the same.So rediculous.

    回覆刪除
  2. Sometimes I meet the same problem, too. >_<
    And I don't know the reason.
    I usually rewrite the code, and then I get "Accepted".
    You can try to rewrite your code or try to think about the reason of "WA".
    Thanks.>_<

    (My English is not good. So if you don't know what I say, I'm sorry. Q_Q...)

    回覆刪除
  3. 作者已經移除這則留言。

    回覆刪除
  4. 作者已經移除這則留言。

    回覆刪除
  5. 這個測資有錯喔
    2

    8 11
    abcDEFGhigg
    hEbkWalDork
    FtyAwaldORm
    FtsimrLqsrc
    byoArBeDeyv
    Klcbqwikomk
    strEBGadhrb
    yUiqlxcnBjf
    4
    Waldorf
    Bambi
    Betty
    Dagbert

    2 2
    ab
    Ca
    3
    a
    ba
    a

    回覆刪除