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 
  • 相关阅读:
    Linux下C程序插入执行shell脚本
    #ifdef预编译相关用法
    LAMP开发之环境搭建(2014.12.7在ubuntu下)
    Qt在VS2010的安装与配置
    vs2010配备boost编程环境
    Ubuntu虚拟机与Window、Arm的通信
    大小端测试程序
    Ubuntu安装google Gtest
    设计模式之单例模式
    设计模式之原型模式
  • 原文地址:https://www.cnblogs.com/ismdeep/p/2582681.html
Copyright © 2011-2022 走看看