Codeforces 1173B Nauuo and Chess
题目链接:http://codeforces.com/problemset/problem/1173/B




思路参考:https://www.cnblogs.com/blowhail/p/10991237.html
AC代码:
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,m;
cin >> n;
m = n / +;
cout << m << endl;
for(int i = ;i <= m;i++)
{
cout << << " " << i << endl;
}
for(int i = ;i <= n - m + ;i++)
{
cout << i << " " << m << endl;
}
return ;
}
Codeforces 1173B Nauuo and Chess的更多相关文章
- code forces 1173 B. Nauuo and Chess
本文链接:https://www.cnblogs.com/blowhail/p/10991237.html B. Nauuo and Chess 原题链接:http://codeforces.com ...
- Codeforces Round #564 (Div. 2) B. Nauuo and Chess
链接:https://codeforces.com/contest/1173/problem/B 题意: Nauuo is a girl who loves playing chess. One da ...
- Codeforces 734D. Anton and Chess(模拟)
Anton likes to play chess. Also, he likes to do programming. That is why he decided to write the pro ...
- Codeforces 1172E Nauuo and ODT [LCT]
Codeforces ZROI那题是这题删掉修改的弱化版--ZROI还我培训费/px 思路 按照套路,我们考虑每种颜色的贡献,然后发现不包含某种颜色的路径条数更容易数,就是删掉该颜色的点后每个连通块大 ...
- Codeforces 1172F Nauuo and Bug [线段树]
Codeforces 思路 定义\(f_{l,r}(x)\)表示数\(x\)从\(l\)进去\(r\)出来的时候会变成什么样子.容易发现这个函数是个分段函数,每一段都是斜率为1的一次函数,并且段数就是 ...
- Codeforces 1172A Nauuo and Cards
题目链接:http://codeforces.com/problemset/problem/1172/A 题意:一共有2*n张牌,n张0,n张1到n.现在随机的n张(有0有数字)在手上,另n张再牌堆中 ...
- Codeforces 1173A Nauuo and Votes
题目链接:http://codeforces.com/problemset/problem/1173/A 思路:模拟. AC代码: #include<bits/stdc++.h> usin ...
- Codeforces 1172D. Nauuo and Portals 构造
原文链接www.cnblogs.com/zhouzhendong/p/CF1172D.html 前言 明哥神仙打cf方式真潇洒.45分钟切D后就不打了? 我当场爆肝D想错方向不会做自闭了. 题解 考虑 ...
- 【杂题】[CodeForces 1172F] Nauuo and Bug【数据结构】【线段树】
Description 给出一个长度为n的序列a和一个整数p 有m组询问,每组询问给出一个区间\([l,r]\) 你需要给出下面这个过程的结果 ans = 0 for i from l to r { ...
随机推荐
- C语言编译exe添加图标
C语言是一门通用的计算机编程语言,可以直接编译为可执行文件.在windows下,可执行文件的后缀是exe,我们编写一个最简单的程序test.c: #include <stdlib.h> i ...
- php下载
生成迅雷下载链接 $url = "http://www.xxx.com/xxx/test.jpg"; echo "thunder://".base64_enco ...
- SSH的两种登录方式
ssh客户端使用的是Xshell,windows环境. 第一种方式,用户名密码方式 原理如下: 客户端发起ssh请求之后,服务器把自己的公钥传给客户端 客户端输入服务器密码通过公钥加密之后传给服务器 ...
- CenterOS 设置静态IP
本文主要介绍这样再CenterOS 中设定静态IP. 工具 centerOS 6.9 步骤 执行命令:vi /etc/sysconfig/network-scripts/ifcfg-eth0 编辑,填 ...
- [转]DrawPrimitive 详解Direct3DDevice8
Direct3DDevice8 函数 05-39 DrawPrimitive 详解 费了好大的劲,终于搞清楚 DirectX 3D 三维图像中 DrawPrimitive 的用法(自嘲:未必). D ...
- Ajax,ajax封装
/** * Created by liyinghao on 2016/8/23. */ /*仿jQuery中的ajax方法,简单版实现;封装ajax的工具函数*/ /* * 1 请求方式 type g ...
- 【React】react&&redux调试工具
一.React调试工具 1.安装 react-developer-tools,在chrome应用商店进行下载,因为网络限制原因,我们可以使用火狐浏览器进行安装下载 a.打开火狐浏览器的附加组件 b.搜 ...
- 20140922 tcpip3次握手 分段 分页 spooling 位示图
tcpip3次握手 http://www.cnblogs.com/CBDoctor/archive/2012/10/17/2727073.html 操作系统:http://blog.csdn.ne ...
- Java中编写一个完美的equals方法
首先看下Java语言规范对equals方法的要求: 1,自反性,对于任何非控引用x,x.equals(x)都应该返回true. 2,对称性,对于任何引用x和y,如果x.equals(y)返回true, ...
- docker使用entrypoint执行时报permission denied错误
在Dockerfile中使用指令ENTRYPOINT来执行项目下entrypoint.shshell文件,如下: ENTRYPOINT ["./entrypoint.sh"] 时报 ...