Educational Codeforces Round 24 CF 818 A-G 补题
6月快要结束了 期末也过去大半了 马上就是大三狗了
取消了小学期后20周的学期真心长, 看着各种北方的学校都放假嗨皮了,我们这个在北回归线的学校,还在忍受酷暑。
过年的时候下定决心要拿块ACM的牌子,一直坚持刷题,这一个学期刷了200道吧,感觉还是小有收获。特别是Ural和Codeforces上的题,质量很高。
然后4月的校赛,5月的省赛,发挥的也一般,不过也没有太失常。
希望暑假的选拔赛能碰到有趣的队友 蛤蛤。
这两天各种考试,实在是太忙,看了一下edu24的题目,不是很容易,做了一道水题,以后再回来补吧。
#include<bits/stdc++.h>
using namespace std;
typedef long long int LL;
const LL N=1,M=1,MOD=1; int main()
{//freopen("t.txt","r",stdin);
ios::sync_with_stdio(false);
LL n,k;
scanf("%I64d%I64d",&n,&k);
k++;
LL l=0,r=(n/2)/k,ret=0;
while(l<=r)
{
LL mid=(l+r)>>1;
if(mid*k>(n/2))r=mid-1;
else ret=mid,l=mid+1;
}
printf("%I64d %I64d %I64d\n",ret,ret*(k-1),n-ret*k);
return 0;
}
Educational Codeforces Round 24 CF 818 A-G 补题的更多相关文章
- Educational Codeforces Round 74 (Rated for Div. 2)补题
慢慢来. 题目册 题目 A B C D E F G 状态 √ √ √ √ × ∅ ∅ //√,×,∅ 想法 A. Prime Subtraction res tp A 题意:给定\(x,y(x> ...
- Educational Codeforces Round 78 (Rated for Div. 2) --补题
链接 直接用数组记录每个字母的个数即可 #include<bits/stdc++.h> using namespace std; int a[26] = {0}; int b[26] = ...
- Educational Codeforces Round 68 (Rated for Div. 2)补题
A. Remove a Progression 签到题,易知删去的为奇数,剩下的是正偶数数列. #include<iostream> using namespace std; int T; ...
- Educational Codeforces Round 46 (Div 2) (A~G)
目录 Codeforces 1000 A.Codehorses T-shirts B.Light It Up C.Covered Points Count(差分) D.Yet Another Prob ...
- Educational Codeforces Round 45 (Div 2) (A~G)
目录 Codeforces 990 A.Commentary Boxes B.Micro-World C.Bracket Sequences Concatenation Problem D.Graph ...
- Educational Codeforces Round 47 (Div 2) (A~G)
目录 Codeforces 1009 A.Game Shopping B.Minimum Ternary String C.Annoying Present D.Relatively Prime Gr ...
- Educational Codeforces Round 24 E
Vova again tries to play some computer card game. The rules of deck creation in this game are simple ...
- codeforces Educational Codeforces Round 24 (A~F)
题目链接:http://codeforces.com/contest/818 A. Diplomas and Certificates 题解:水题 #include <iostream> ...
- Educational Codeforces Round 24 A 水 B stl C 暴力 D stl模拟 E 二分
A. Diplomas and Certificates time limit per test 1 second memory limit per test 256 megabytes input ...
随机推荐
- 用canvas实现一个colorpicker
http://www.cnblogs.com/ufex/p/6382982.html 每个浏览器都有自己的特点,比如今天要做的colorpicker就是,一千个浏览器,一千个哈姆雷特,一千个color ...
- [vxlan] 二 什么是VXLAN
VXLAN是一种mac in UDP的技术.简单讲就是传统的二层帧被封装到了UDP的package中.通过UDP的IP网络发送到目的地然后再解封装. VXLAN 跟VLAN对比,最重要的一个概念就是V ...
- SpringMVC拦截器详解[附带源码分析](转)
本文转自http://www.cnblogs.com/fangjian0423/p/springMVC-interceptor.html 感谢作者 目录 前言 重要接口及类介绍 源码分析 拦截器的配置 ...
- STM8S---选项字节(Option Byte)写操作之IO复用
功能实现目标 通过对选项字节的写操作来实现TIM2的CH3通道的PWM输出IO复用.能够设置为PA3或者PD2输出. 通过STVP方式操作链接 选项字节 选项字节包含芯片硬件特性的配置和存储器 ...
- weexapp 开发流程(一)开发环境配置
1.创建项目 weexpack create weexapp 2.安装必要插件 npm i jwt-simple vue-resource vue-router vuex vuex-router-sy ...
- [转载]php中深拷贝浅拷贝
转自:http://cnn237111.blog.51cto.com/2359144/1283163 PHP中提供了一种对象复制的操作,clone.语法颇为简单: $a = clone $b; 1.浅 ...
- iOS设计模式 - (3)简单工厂模式
iOS设计模式 - (3)简单工厂模式 by Colin丶 转载请注明出处: http://blog.csdn.net/hitwhylz/article/ ...
- 【Web前端】清除浮动&css中文字体
清理浮动有非常多种方式,像使用 br 标签自带的 clear 属,使用元素的 overflow.使用空标签来设置 clear:both 等等.但考虑到兼容问题和语义化的问题,一般我们都会使用例如以下代 ...
- 细数AutoLayout以来UIView和UIViewController新增的相关API
本文转载至 http://www.itjhwd.com/autolayout-uiview-uiviewcontroller-api/ 细数AutoLayout以来UIView和UIViewContr ...
- Java 复杂excel报表导出
MyExcel,是一个可直接使用Html文件,或者使用内置的Freemarker.Groovy.Beetl等模板引擎Excel构建器生成的Html文件,以Html文件中的Table作为Excel模板来 ...