水题 HDOJ 4716 A Computer Graphics Problem
/*
水题:看见x是十的倍数就简单了
*/
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <cmath>
using namespace std; const int MAXN = 1e4 + ;
const int INF = 0x3f3f3f3f; int main(void) //HDOJ 4716 A Computer Graphics Problem
{
//freopen ("A.in", "r", stdin); int t, cas = ;
scanf ("%d", &t);
while (t--)
{
int x;
scanf ("%d", &x);
x /= ; printf ("Case #%d:\n", ++cas);
printf ("*------------*\n");
for (int i=; i<=-x; ++i)
{
printf ("|............|\n");
}
for (int i=; i<=x; ++i)
{
printf ("|------------|\n");
}
printf ("*------------*\n");
} return ;
} /*
Case #1:
*------------*
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
*------------*
Case #2:
*------------*
|............|
|............|
|............|
|............|
|------------|
|------------|
|------------|
|------------|
|------------|
|------------|
*------------*
*/
水题 HDOJ 4716 A Computer Graphics Problem的更多相关文章
- HDU 4716 A Computer Graphics Problem (水题)
A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (J ...
- HDU 4716 A Computer Graphics Problem
A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (J ...
- HDU 4716 A Computer Graphics Problem 2013年四川省赛题
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4716 题目大意不用解释了吧,看案例就能明白 #include<cstdio> #inclu ...
- HDUOJ----A Computer Graphics Problem
A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (J ...
- 水题 HDOJ 4727 The Number Off of FFF
题目传送门 /* 水题:判断前后的差值是否为1,b[i]记录差值,若没有找到,则是第一个出错 */ #include <cstdio> #include <iostream> ...
- HDU-4716 A Computer Graphics Problem 水题
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4716 直接搞.. //STATUS:C++_AC_0MS_288KB #include <fun ...
- HDOJ 2317. Nasty Hacks 模拟水题
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Tota ...
- HDOJ/HDU 1328 IBM Minus One(水题一个,试试手)
Problem Description You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or ...
- HDU 5832 A water problem(某水题)
p.MsoNormal { margin: 0pt; margin-bottom: .0001pt; text-align: justify; font-family: Calibri; font-s ...
随机推荐
- Scheme笔记(1)
(define pi 3.14159) (define radius 10) (* pi (* radius radius)) (define circumference (* 2 pi radius ...
- HDU 4883 TIANKENG’s restaurant
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4883 解题报告:一家餐馆一天中有n波客人来吃饭,第 i 波 k 客人到达的时间是 s ,离开时的时间 ...
- 作为一名职高生学习Linux的心酸经历
当你点进这篇文章的时候,一定会好奇我为什么要用“心酸”这个词,这个词已经太久没被人提起,也许心酸这种感情只能存在于一个人在追中梦想过程中内心角落吧.从小我们总是会被问这样一个问题“你的梦想是什么?”每 ...
- cocos2d调度器(定时执行某函数)
调度器(scheduler) 继承关系 原理介绍 Cocos2d-x调度器为游戏提供定时事件和定时调用服务.所有Node对象都知道如何调度和取消调度事件,使用调度器有几个好处: 每当Node不再可见或 ...
- Leetcode 之Convert Sorted Array to Binary Search Tree(54)
思路很简单,用二分法,每次选中间的点作为根结点,用左.右结点递归. TreeNode* sortedArrayToBST(vector<int> &num) { return so ...
- C/C++语法知识:typedef struct 用法详解
第一篇:typedef struct与struct的区别 1. 基本解释 typedef为C语言的关键字,作用是为一种数据类型定义一个新名字.这里的数据类型包括内部数据类型(int,char等)和自定 ...
- 排序稳定性stable
stable排序 O(n^2): InsertionSort,BubbleSort O(nlgn): MergeSort O(n+k): CountSort, RadixSort,BucketSort ...
- 如何分割一个utf8字符串(保证单个汉字的完整性)
std::list<std::string> split_utf8_string(const std::string& text) { std::list<std::stri ...
- (转)Sql Server 对锁的初步认识
一:到底都有哪些锁 学习锁之前,必须要知道锁大概有几种???通常情况下作为码农我们只需知道如下几个锁即可... 1.S(Share)锁 为了方便理解,我们可以直接这么认为,当在select的时候在表, ...
- 如何破解excel宏的密码
http://zhidao.baidu.com/question/140107193.html 最近下载了一个excel模板,使用excel宏编的,但实际需要需更改一下,但是他设置了工作表密码保护,谁 ...