#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. springmvc中@PathVariable和@RequestParam的区别

    顾名思义, @PathVariable和@RequestParam,分别是从路径里面去获取变量,也就是把路径当做变量,后者是从请求里面获取参数. 我的url; http://localhost:808 ...

  2. textViewDidChange: crashes in iOS 7

    What's happening is that you're typing what is referred to as multistage text input, i.e. the input ...

  3. nmap端口状态解析

    nmap端口状态解析 状态 说明 open 应用程序在该端口接收 TCP 连接或者 UDP 报文 closed 关闭的端口对于nmap也是可访问的, 它接收nmap探测报文并作出响应.但没有应用程序在 ...

  4. HBase + Kerberos 配置示例(二)

    接上篇<HBase + Kerberos配置示例(一)>,我们继续剩下的配置工作. 环境准备 Hadoop配置 Zookeeper配置 HBase配置 Java测试程序 环境准备 安装ha ...

  5. Android 组件系列-----Activity的传值和回传值

    在这篇随笔里将讲解Activity的传值和回传值. 一.通过startActivity来进行Activity的传值 在Android中,如果我们要通过一个Activity来启动另一个Activity, ...

  6. 【Vegas原创】SVN的搭建及安装使用

    中文手册:http://tortoisesvn.net/docs/nightly/TortoiseSVN_zh_CN/index.html 所需程序: 1,TortoiseSVN  http://so ...

  7. ubuntu 下截图与快捷键设置

    1. 安装 这里使用的 kubuntu sudo apt-get install ksnapshot 2. 设置快捷键 点击左下角的开始菜单,选择`应用程序` `设置` `系统设置` ksnapsho ...

  8. [emacs org-mode小技巧] org-indent-mode 让文档更容易阅读

    刚发现Emacs的org-mode里面一个叫做 org-indent-mode 的minor mode对于阅读org-mode文档很不错,版面看起来清晰多了: 从上图可以看到,org-indent-m ...

  9. IOS 开发环境,证书和授权文件等详解

    (转自:http://blog.csdn.net/gtncwy/article/details/8617788) 一.成员介绍1.    Certification(证书)证书是对电脑开发资格的认证, ...

  10. Oracle 10gR2 & 10.2.0.5 的百度网盘下载地址 :)

    如题: https://pan.baidu.com/s/1eSI770m