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 
  • 相关阅读:
    Cactus详细讲解
    jexus处理静态文件(处理后缀)
    简单的html兼容(参考js和css的常规写法)
    IOHelper(自制常用的输入输出的帮助类)
    @Html.AntiForgeryToken() 源码分析,表单防伪码的生成
    缓存处理类(MemoryCache结合文件缓存)
    MVC过滤大法(过滤静态文件)
    C#文件监控工具(对追加内容的监控并输出)
    C#在Linux上的开发指南
    对java面试文章的技术漫谈的C#技术理解
  • 原文地址:https://www.cnblogs.com/ismdeep/p/2582681.html
Copyright © 2011-2022 走看看