#include <queue>
#include <string>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define N 20000
using namespace std; int num[][]; int main()
{
int n;
cin>>n;
for(int j=; j<= && n; ++j){
for(int i=; i<=; ++i){
if(j> && i==) continue;
--n;
num[i][j] = ;
if(n == ) break;
}
} printf("+------------------------+\n");
for(int i = ; i<=; ++i){
printf("|");
for(int j=; j<=; ++j){
if(num[i][j]) printf("O.");
else{
if( i != || (i== && j==))
printf("#.");
else printf("..");
}
}
if(i == ) printf("|D|)\n");
if(i==) printf("|.|\n");
if(i==) printf("..|\n");
if(i==) printf("|.|)\n");
}
printf("+------------------------+\n");
return ;
}

codeforces A. Bayan Bus(简单模拟)的更多相关文章

  1. codeforces 475A.Bayan Bus 解题报告

    题目链接:http://codeforces.com/problemset/problem/475/A 题目意思:输入一个整数 k(0 ≤ k ≤ 34),表示participants的人数,需要在一 ...

  2. CodeForces 670 A. Holidays(模拟)

    Description On the planet Mars a year lasts exactly n days (there are no leap years on Mars). But Ma ...

  3. java web学习总结(二十二) -------------------简单模拟SpringMVC

    在Spring MVC中,将一个普通的java类标注上Controller注解之后,再将类中的方法使用RequestMapping注解标注,那么这个普通的java类就够处理Web请求,示例代码如下: ...

  4. WPF简单模拟QQ登录背景动画

    介绍 之所以说是简单模拟,是因为我不知道QQ登录背景动画是怎么实现的.这里是通过一些办法把它简化了,做成了类似的效果 效果图 大体思路 首先把背景看成是一个4行8列的点的阵距,X轴Y轴都是距离70.把 ...

  5. Linux 内核 链表 的简单模拟(2)

    接上一篇Linux 内核 链表 的简单模拟(1) 第五章:Linux内核链表的遍历 /** * list_for_each - iterate over a list * @pos: the & ...

  6. Linux 内核 链表 的简单模拟(1)

    第零章:扯扯淡 出一个有意思的题目:用一个宏定义FIND求一个结构体struct里某个变量相对struc的编移量,如 struct student { int a; //FIND(struct stu ...

  7. JavaWeb学习总结(四十九)——简单模拟Sping MVC

    在Spring MVC中,将一个普通的java类标注上Controller注解之后,再将类中的方法使用RequestMapping注解标注,那么这个普通的java类就够处理Web请求,示例代码如下: ...

  8. 简单模拟Hibernate的主要功能实现

    在学习期间接触到Hibernate框架,这是一款非常优秀的O/R映射框架,大大简化了在开发web项目过程中对数据库的操作.这里就简单模拟其底层的实现. /*******代码部分,及其主要注解***** ...

  9. cf475A Bayan Bus

    A. Bayan Bus time limit per test 2 seconds memory limit per test 256 megabytes input standard input ...

随机推荐

  1. 安装 Autoconf 2.69版

    发生错误configure.ac:8: error: Autoconf version 2.64 or higher is required 1.检查版本 [root@localhost Deskto ...

  2. node.js在windows环境下的安装

    node.js官网 https://nodejs.org/en/ Download

  3. RTX的api開發實例

    RTX的api開發實例 最近接觸了RTX的接口開發部份,RTX其实有很多玩法,除了可以用自帶的客戶端發消息之外還可以用PHP調用API的方式來做一些事情,下邊整理了一下分享給大家 值得提醒的是这些接口 ...

  4. loadlibrary DLL 0失败 的一个原因。

    加载DLL失败,因为 dll 中有一个全局类变量,由于在构造函数 没有初始化变量,导致 初始化 失败 异常. C++ 变量没有初始值,全部都要 手动赋值 为 0 的这个特性 还真是烦人呢...

  5. Chkdsk scan needed on volume

    After we extended the volume in storage array, in Failover cluster, it shows the volume is of 30.0 T ...

  6. 线程与并发系列一:Lock、Monitor、UserSpinLock

    using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using S ...

  7. 更多文章请访问"程序旅途”

    更多文章请访问我的个人独立博客 程序旅途

  8. MDT 2010驱动管理新方法。

    参考:https://4sysops.com/archives/driver-deployment-with-microsoft-deployment-toolkit-mdt-part-1-os-de ...

  9. PS脚本获取网络适配器状态

    1. Get-WmiObject -Class Win32_NetworkAdapterConfiguration ` -filter "IPEnabled = $true" 2. ...

  10. PUT vs POST in REST

    来自:http://stackoverflow.com/questions/630453/put-vs-post-in-rest http://www.15yan.com/story/7dz6oXiS ...