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的位置前的操作次数 ...
随机推荐
- CAFFE中训练与使用阶段网络设计的不同
神经网络中,我们通过最小化神经网络来训练网络,所以在训练时最后一层是损失函数层(LOSS), 在测试时我们通过准确率来评价该网络的优劣,因此最后一层是准确率层(ACCURACY). 但是当我们真正要使 ...
- Nginx 和 IIS 实现动静分离【转载】
前段时间,搞Nginx+IIS的负载均衡,想了解的朋友,可以看这篇文章:<nginx 和 IIS 实现负载均衡>,然后也就顺便研究了Nginx + IIS 实现动静分离.所以,一起总结出来 ...
- MD5 32位加密算法源码(测试通过)(系转载 飞扬天下)
供自己学习使用 md5.h文件 #ifndef MD5_H #define MD5_H #include <string> #include <fstream> /* Type ...
- strictmode
最新的Android平台中(Android 2.3起),新增加了一个新的类,叫StrictMode(android.os.StrictMode).这个类可以用来帮助开发者改进他们编写的应用,并且提供了 ...
- gameUnity 0.15 beta 网络游戏框架
增加了 换人 和换衣服 ,加入了动画事件.beta版本 0.15测试版本 目前就到此,正式版本 会在7月底 和 0.2版本一起推出.届时,换装系统 将不仅仅是 换装备,而是有 换装后 打怪的体验,更 ...
- pycharm快捷键、常用设置、配置管理
http://blog.csdn.net/pipisorry/article/details/39909057 pycharm学习技巧 Learning tips /pythoncharm/help/ ...
- SQL Server触发器的禁用和启用
禁用: ALTER TABLE trig_example DISABLE TRIGGER trig1 GO 恢复: ALTER TABLE trig_example ENABLE TRIGGER tr ...
- [原]左右的移动<<>><>jQuery的实现
$(function () { $('#toAllLeft').click(function () { $('#se1 option').app ...
- swift(2)元祖(Tuple)
let somePoint = (, ) switch somePoint { , ): // 位于远点 println("(0, 0) is at the origin") ): ...
- OpenCart之联系我们contact us页面提交时邮件错误
许多OpenCart系统的用户都发现联系我们contact us页面提交时发生错误.本页发生错误是正常的,原因如下: 1. 你设定了SMTP,因此SMTP默认是从你设置的SMTP的email账户中发出 ...