【foj 1746 A Water Problem】

真的是好水的题目啊,吓到了。。。

Problem 1746 A Water Problem

Accept: 169    Submit: 351
Time Limit: 1000 mSec    Memory Limit : 32768 KB

Problem Description

This is a easy problem,I don't went to say any more.

Input

There will be several test cases.

Output

For each test case, output only contain one line.

Sample Input

.....#.......#..........
.....###.....###........
.....##.....##..........
.....##.....#.......#...
.....##....###########..
.#...##....#......###...
..#..##...#.#....##.....
..##.##..#..##..##......
..##.##.#....#.##.......
...#.##.......##........
.....##......##..###....
.....##....##....##.....
.....##..##......##.##..
....###################.
...#.##..........##.....
..##.##....#.....##.....
.##..##....##....##.....
..#..##.....##...##.....
.....##.....#....##.....
.....##..........##.....
.....##..........##.....
.....##......######.....
.....##........###......
.....#..........#.......

......#........#........
......###......###......
......##.......##.......
......##.......##.......
..#...##.......##.......
..###.##..#....##...##..
..##..##..#############.
..##..##..##...##...##..
..##..##..##...##...##..
..##..##..##...##...##..
..##..##..##...##...##..
..##..##..##...##...##..
..##..##..##...##...##..
..##..##..##...##...##..
..##..##..##...##...##..
..##..##..##...##...##..
..##..##..##...##...##..
..#...##..##...##.####..
.....##...#....##...#...
.....##........##.......
....##.........##.......
....#..........##.......
...#...........##.......
...............#........

Sample Output
Black King
Red General

Source

FOJ-2009年5月月赛
 
 1 // Project name : 1746 ( A Water Problem ) 
 2 // File name    : main.cpp
 3 // Author       : Izumu
 4 // Date & Time  : Mon Jul  9 14:24:24 2012
 5 
 6 
 7 #include <iostream>
 8 #include <cstring>
 9 using namespace std;
10 
11 int main()
12 {
13     string s;
14     while (cin >> s)
15     {
16         for (int i = 0; i < 23; i++)
17         {
18             cin >> s;
19         }
20 
21         if (s == ".....#..........#.......")
22         {
23             cout << "Black King" << endl;
24         }
25         else
26         {
27             cout << "Red General" << endl;
28         }
29     }
30     return 0;
31 }
32 
33 // end 
34 // ism 
原文地址:https://www.cnblogs.com/ismdeep/p/2582681.html