zoukankan      html  css  js  c++  java
  • 【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 
  • 相关阅读:
    PHP04
    PHP03
    PHP02
    PHP01
    jquery attr()方法获取input的checked属性问题
    vue案例
    js基础(数组)
    js基础
    POJ1659 可图性判定
    ZOJ3329 概率DP
  • 原文地址:https://www.cnblogs.com/ismdeep/p/2582681.html
Copyright © 2011-2022 走看看