#include <iostream>
using namespace std; int main(){
int n,p,k;
cin >> n >> p >> k;
bool hasLeft = true, hasRight = true;
int first = p-k,last = p + k;
if( p - k <= ) first = ,hasLeft = false;
if( p + k >= n) last = n,hasRight = false;
if(hasLeft) cout<<"<< ";
for(int i = first; i<= last; ++ i){
if(i == p) cout<<"("<<p<<") ";
else cout<<i<<" ";
}
if(hasRight) cout<<" >>"<<endl;
}

Codeforces Round #233 (Div. 2) A、Pages的更多相关文章

  1. Codeforces Round #233 (Div. 2) B. Red and Blue Balls

    #include <iostream> #include <string> using namespace std; int main(){ int n; cin >&g ...

  2. Codeforces Round #437 (Div. 2)[A、B、C、E]

    Codeforces Round #437 (Div. 2) codeforces 867 A. Between the Offices(水) 题意:已知白天所在地(晚上可能坐飞机飞往异地),问是否从 ...

  3. Codeforces Round #298 (Div. 2) A、B、C题

    题目链接:Codeforces Round #298 (Div. 2) A. Exam An exam for n students will take place in a long and nar ...

  4. Codeforces Round #482 (Div. 2) C 、 Kuro and Walking Route(dfs)979C

    题目链接:http://codeforces.com/contest/979/problem/C 大致题意 给出n个点,有n-1个边将他们链接.给出x,y,当某一路径中出现x....y时,此路不通.路 ...

  5. Codeforces Round #604 (Div. 2) D、E、F题解

    Beautiful Sequence Beautiful Mirrors Beautiful Bracket Sequence (easy version) Beautiful Sequence \[ ...

  6. Codeforces Round #674 (Div. 3) C、D 题解

    C.Increase and Copy #枚举 题目链接 题意 最初你有仅包含一个数字\(1\)的数组\(a\),一次操作中可对该数组进行两类操作: 从数组中选择一个元素,将该元素\(+1\): 从数 ...

  7. Codeforces Round #677 (Div. 3) E、G题解

    E. Two Round Dances #圆排列 题目链接 题意 \(n\)(保证偶数)个人,要表演一个节目,这个节目包含两种圆形舞蹈,而每种圆形舞蹈恰好需要\(n/2\)个人,每个人只能跳一种圆形舞 ...

  8. Codeforces Round #667 (Div. 3) B、C、D、E 题解

    抱歉B.C题咕了这么久 B. Minimum Product #枚举 #贪心 题目链接 题意 给定四个整数\(a, b, x, y\),其中\(a\geq x, b\geq y\),你可以执行不超过\ ...

  9. Codeforces Round #660 (Div. 2) A、B、C题解

    A. Captain Flint and Crew Recruitment #构造 题目链接 题意 定义一类正整数,能够被\(p*q\)表示,其中\(p.q(1<p<q)\)均为素数,称之 ...

随机推荐

  1. Linux内核驱动之GPIO子系统(一)GPIO的使用

    转自:http://blog.csdn.net/mirkerson/article/details/8464290 一 概述 Linux内核中gpio是最简单,最常用的资源(和 interrupt , ...

  2. windows常用命令

    打开"运行"对话框(Win+R),输入cmd,打开控制台命令窗口... 也可以通过cmd /c 命令 和 cmd /k 命令的方式来直接运行命令 注:/c表示执行完命令后关闭cmd ...

  3. SQL Server 2014 BI新特性(一)五个关键点带你了解Excel下的Data Explorer

    Data Explorer是即将发布的SQL Server 2014里的一个新特性,借助这个特性讲使企业中的自助式的商业智能变得更加的灵活,从而也降低了商业智能的门槛. 此文是在微软商业智能官方博客里 ...

  4. c++ 调用dll

    1.首先写一个dll程序并且输出成dll. 新建win32项目,然后在应用程序类型中选择dll. HelloDll.h: #pragma once #ifndef MYDLL_API_EXPORTS ...

  5. 恢复 git reset -hard 的误操作

    有时候使用Git工作得小心翼翼,特别是涉及到一些高级操作,例如 reset, rebase 和 merge.甚至一些很小的操作,例如删除一个分支,我都担心数据丢失. 不 久之前,我在做一些大动作(re ...

  6. 攻城狮在路上(壹) Hibernate(十六)--- Hibernate声明数据库事务

    一.数据库事务的概念: 数据库的ACID特征:Atomic.Consistency.Isolation.Durability.原子性.一致性.隔离性.持久性.不同的隔离级别引发的不同问题. 事务的AC ...

  7. android 入门-ID

    @+id/btn             //表示在R.java文件里面新增一个id为btn的控件索引,最常用的一种声明控件id的方式. @+android:id/list  //+android:表 ...

  8. phpcms v9中调用栏目及调用多个子栏目中的文章列表

    调用一个指定栏目列表:            {pc:content action="lists" catid="6" order="id DESC& ...

  9. [Mobile] 手机浏览器输入框-数字输入框

    手机浏览器的输入框,一直都是以web的方式进行开发的,没有关注到用户体验,领导提出了输入框要弹出数字输入框,想来应该有这种技术能实现.   搜索之后发现可以使用type="number&qu ...

  10. 第十四篇:在SOUI中使用定时器

    前言 定时器是win32编程中常用的制作动画效果的手段.在Win32编程中,可以使用::SetTimer来创建定时器,定时器消息会被会发到调用SetTimer时指定的HWND. 在SOUI中一般来说只 ...