322 - Ships

All about problems in Volume 3. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
morris821028
New poster
Posts: 13
Joined: Thu Dec 06, 2012 4:07 pm

322 - Ships

Post by morris821028 » Tue Jul 30, 2013 1:24 pm

Input:

Code: Select all

10 10
........oo
oooooxoooo
oxooxxxo..
xxoooooo..
xoooxooo.x
ooxxxxoooo
oooooxxoox
ooooooxoox
ooooooooxx
oooooooooo

10 10
.........o
oooooxoooo
oxooxxxo..
xxoooooo..
xoooxooo.x
ooxxxxoooo
oooooxxoox
ooooooxoox
ooooooooxx
oooooooooo

10 10
........oo
oooooxoooo
oxooxxx...
xxoooooo..
xoooxooo.x
ooxxxxoooo
oooooxxoox
ooooooxoox
ooooooooxx
oooooooooo

10 4
..........
..........
..........
..........

10 10
.x..x.....
oooooxoooo
oxooxxx...
xxoooooo..
xoooxooo..
ooxxxxoo..
oooooxxoox
ooooooxoox
ooooooooxx
oooooooooo

15 2
...............
...............

7 7
xxxxoxo
oxooxxx
xxoooxx
xooxoxx
oxxxxoo
xoooxxo
xxxooxo

7 7
....o.o
o.oo...
..ooo..
.oo.o..
o....oo
.ooo..o
...oo.o

8 8
o.o.oo..
oox.....
ooo....o
xx.o....
.xooooo.
o.o....x
.x..o.x.
..oxo.o.

0 0

AC output:

Code: Select all

Game #1
yes.

Game #2
no.

Game #3
no.

Game #4
no.

Game #5
yes.

Game #6
yes.

Game #7
yes.

Game #8
yes.

Game #9
no.

Note: Input test data format is different from http://www.ntnu.edu.tw/acm/ProblemSetAr ... index.html given. If you search by google, maybe you find this problem.

??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????(?????)???????????????????????????????????????????????????????????????????

???????????????????????????????????????????????????????????????????????????????????????????????????????????? "yes."????? "no."?

?????????????????????? "yes."

?????????????????????????????? h*w ?????????????????????????????????
?? Taiwan ! ??????????

mars kaseijin
New poster
Posts: 22
Joined: Mon Sep 19, 2005 4:58 am
Contact:

Re: 322 - Ships

Post by mars kaseijin » Wed Jul 29, 2015 1:40 pm

I looked at sample input, 10 x 10, but did not understand how is it "Yes" when the square box
xx
xx
is no where in the 10 x 10 grid! The problem description does say all ships are supposed in. NO?

Post Reply

Return to “Volume 3 (300-399)”