CodeForces 610A Pasha and Stick
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std; int n,ans; int main()
{
while(~scanf("%d",&n)){
ans=;
if(n%!=)ans=;
else ans=(n/-)/;
printf("%d\n",ans);
}
return ;
}
CodeForces 610A Pasha and Stick的更多相关文章
- Codeforces Round #337 (Div. 2) A. Pasha and Stick 数学
A. Pasha and Stick 题目连接: http://www.codeforces.com/contest/610/problem/A Description Pasha has a woo ...
- Codeforces Round #337 (Div. 2) A. Pasha and Stick 水题
A. Pasha and Stick Pasha has a wooden stick of some positive integer length n. He wants to perform ...
- codeforces 557B. Pasha and Tea 解题报告
题目链接:http://codeforces.com/problemset/problem/557/B 题目意思:有 2n 个茶杯,规定第 i 个茶杯最多只能装 ai 毫升的水.现在给出 w 毫升的水 ...
- Codeforces 435B. Pasha Maximizes
简单贪心.... B. Pasha Maximizes time limit per test 1 second memory limit per test 256 megabytes input s ...
- Codeforces 595B - Pasha and Phone
595B - Pasha and Phone 代码: #include<bits/stdc++.h> using namespace std; #define ll long long # ...
- Codeforces 595B. Pasha and Phone 容斥
B. Pasha and Phone time limit per test 1 second memory limit per test 256 megabytes input standard i ...
- codeforces B. Pasha and String
Pasha got a very beautiful string s for his birthday, the string consists of lowercase Latin letters ...
- codeforces B. Pasha and String(贪心)
题意:给定一个长度为len的字符序列,然后是n个整数,对于每一个整数ai, 将字符序列区间为[ai,len-ai+1]进行反转.求出经过n次反转之后的序列! /* 思路1:将区间为偶数次的直接去掉!对 ...
- [ An Ac a Day ^_^ ] CodeForces 525B Pasha and String 技巧
题意就是一次次翻转字符串 然后输出最终的字符串 暴力一发O(n*m)果然超时了 因为每次翻转的的都是a-1到对称位置 所以一个位置翻转两次等于没有操作 所以只需要记录一下len/2的位置前的操作次数 ...
随机推荐
- springboot 打包
springboot 打包 先clean 然后 maven package 通过命令java -jar target/GoshenWepPro-0.1.0.jar运行程序
- Let'sencrypt认证的网站Https配置
推荐使用这个脚本,具体说明里面都有 https://github.com/xdtianyu/scripts/tree/master/le-dns 它是通过调用dns服务商的api更新txt记录实现,无 ...
- 7z 的命令行
用于压缩和解压缩 来源:http://blog.csdn.net/shuckstark/article/details/7598443 挺有用的东西,写脚本时用处多多, 7z.exe和7za.exe ...
- iOS开发 GET、POST请求方法:NSURLSession篇
NSURLConnection,在iOS 9被宣布弃用,本文不使用NSURLConnection进行网络编程,有兴趣的童鞋可以参考: iOS开发 GET.POST请求方法(NSURLConnectio ...
- Too Much Money
Too Much Money time limit per test 2 seconds memory limit per test 256 megabytes input standard inpu ...
- JUST SORT
We define B is a Divisor of one number A if A is divisible by B. So, the divisors of 12 are 1, 2, 3, ...
- NSAttributedString in Swift
转载自: https://www.invasivecode.com/weblog/attributed-text-swift/ I have been talking quite a lot in ...
- 安卓开发-使用XML菜单布局简单介绍
使用xml布局菜单 目前为止我们都是通过硬编码来增加菜单项的,android为此提供了一种更便利的方式,就是把menu也定义为应用程序的资源,通过android对资源的本地支持,使我们可以更方便地 ...
- 新建aix实例
http://www.cnblogs.com/kfarvid/archive/2010/12/21/1912553.html DB2数据库 http://wenku.baidu.com/view/ ...
- iOS 开发者应该知道的 ARM 结构
http://news.cnblogs.com/n/68903/ 我在写「NEON on iPhone 入门」的时候,曾以为读者已经比较了解 iOS设备的处理器知识.然而,看过网上的一些讨论,我才发现 ...