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 ...
随机推荐
- ROS下使用ASUS Xtion Pro Live
一.ROS官网hydro版本OpenNI安装 3. Installation 3.1 Ubuntu installation To install only openni_camera: sudo a ...
- js中的offsetParent,offsetLeft,offsetTop及jquery的offset(),position()比较
1.offsetParent 元素的offsetParent并不是元素的父元素,判断元素的offsetParent要根据以下情况: 1)当DOM结构层次中的元素均没有进行css定位(设置positio ...
- XCTFreverse第一道DMD
MD5解一次密即可
- 【kotlin】kotlin中List中添加List怎么操作
如题,List集合添加一个List集合怎么操作 如上,现在有了List<A>,A类中有个字段List<B>, 新创建一个List<B>,想把LIst<A> ...
- 辅助方法 @Html.Raw与 HtmlString区别
//Html.Raw其实是调用 new Microsoft.AspNetCore.Html.HtmlString(xxx) @{ ViewData["Title"] = " ...
- 2017年记录CS+CV
2017年3月开学,始终感觉自己计算机基础薄弱,加上之前自己也开始对机器学习,深度学习有一些了解,始终感觉没有入门.自己开始规划系统学习计算机软件(CS)和计算机视觉(CV)的基础知识.@2017/9 ...
- [WASM] Set up wasm-bindgen for easy Rust/JavaScript Interoperability
Interoperability between JavaScript and Rust is limited to numerics and accessing memory directly. S ...
- max-points-on-a-line——穷举
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. ...
- Katalon
Katalon---一款好用的selenium自动化测试插件 selenium框架是目前使用较广泛的开源自动化框架,一款好的.基于界面的录制工具对于初学者来说可以快速入门:对于老手来说可以提高开发自动 ...
- PHP读取excel(5)
如果数据量很大的时候,就需要用PHPExcel迭代器逐行读取,具体代码如下: <?php header("Content-Type:text/html;charset=utf-8&qu ...