Educational Codeforces Round 100 (Rated for Div. 2) 简单记录
最近在写Web大作业和期末复习,可能还会有一段时间不会更新blog了
1463A. Dungeon
题意:有3个血量为a,b,c的敌人,现在你每7发子弹能进行一次范围AOE攻击(即一次能集中三人),每次子弹必中并扣一点生命值,请问是否能在最后一发子弹同时击倒3个敌人
思路:很简单,由于每7发会进行范围攻击,则说明如果敌人的血量和为9的倍数,又或者血量仅一人分担时输出”YES“
void solve() {
ll a, b, c;
cin >> a >> b >> c;
ll s = a + b + c;
puts((s % 9 || s / 9 > a || s / 9 > b || s / 9 > c) ? "NO" : "YES");
}
1463B. Find The Array
void solve() {
ll n, x, b;
cin >> n;
while (n--) {
cin >> x, b = 0;
while (1 << b <= x)
b++;
cout << (1 << (b - 1)) << " ";
}
cout << endl;
}
Educational Codeforces Round 100 (Rated for Div. 2) 简单记录的更多相关文章
- Educational Codeforces Round 60 (Rated for Div. 2) - D. Magic Gems(动态规划+矩阵快速幂)
Problem Educational Codeforces Round 60 (Rated for Div. 2) - D. Magic Gems Time Limit: 3000 mSec P ...
- Educational Codeforces Round 63 (Rated for Div. 2) 题解
Educational Codeforces Round 63 (Rated for Div. 2)题解 题目链接 A. Reverse a Substring 给出一个字符串,现在可以对这个字符串进 ...
- Educational Codeforces Round 71 (Rated for Div. 2)-E. XOR Guessing-交互题
Educational Codeforces Round 71 (Rated for Div. 2)-E. XOR Guessing-交互题 [Problem Description] 总共两次询 ...
- Educational Codeforces Round 129 (Rated for Div. 2) A-D
Educational Codeforces Round 129 (Rated for Div. 2) A-D A 题目 https://codeforces.com/contest/1681/pro ...
- Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship
Problem Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship Time Limit: 2000 mSec P ...
- Educational Codeforces Round 43 (Rated for Div. 2)
Educational Codeforces Round 43 (Rated for Div. 2) https://codeforces.com/contest/976 A #include< ...
- Educational Codeforces Round 35 (Rated for Div. 2)
Educational Codeforces Round 35 (Rated for Div. 2) https://codeforces.com/contest/911 A 模拟 #include& ...
- Codeforces Educational Codeforces Round 44 (Rated for Div. 2) F. Isomorphic Strings
Codeforces Educational Codeforces Round 44 (Rated for Div. 2) F. Isomorphic Strings 题目连接: http://cod ...
- Codeforces Educational Codeforces Round 44 (Rated for Div. 2) E. Pencils and Boxes
Codeforces Educational Codeforces Round 44 (Rated for Div. 2) E. Pencils and Boxes 题目连接: http://code ...
- Educational Codeforces Round 39 (Rated for Div. 2) G
Educational Codeforces Round 39 (Rated for Div. 2) G 题意: 给一个序列\(a_i(1 <= a_i <= 10^{9}),2 < ...
随机推荐
- mySql中使用命令行建表基本操作
一:打开命令行启动mysql服务 注意事项:应该使用管理员身份打开命令行键入命令:net start mysql (鼠标右键使用管理员身份打开),否则会出现拒绝访问报错. 二:登陆数据库 登陆命令为& ...
- C语言-变量常量数据类型
常量:不会变化的数据.不能被修改. 1. "hello".'A'.-10.3.1415926(浮点常量) 2. #define PI 3.1415 [强调]:没有分号结束标记. [ ...
- 构建一个语音转文字的WebApi服务
构建一个语音转文字的WebApi服务 简介 由于业务需要,我们需要提供一个语音输入功能,以便更方便用户的使用,所以我们需要提供语音转文本的功能,下面我们将讲解使用Whisper将语音转换文本,并且封装 ...
- 【UniApp】-uni-app-OptionAPI应用生命周期和页面生命周期
前言 好,经过上个章节的介绍完毕之后,了解了一下 uni-app-修改组件主题和样式 那么了解完了uni-app-修改组件主题和样式之后,这篇文章来给大家介绍一下 uni-app-OptionAPI应 ...
- [AGC59C] Guessing Permutation for as Long as Possible
Problem Statement A teacher has a hidden permutation $P=(P_1,P_2,\ldots,P_N)$ of $(1,2,\cdots,N)$. Y ...
- Git恢复删除的文件,一行命令就可以啦~
情况一:删除或者修改了某个文件,但是没有add # 单个 git checkout filename # 多个 git checkout . 情况二:删除或者修改了某个文件,已经add,但是没有com ...
- 安装服务器提示A debugger has been found running in your system. Please, unload it from memory and restart
解决方法:运行msconfig,取消调试模式,重启电脑再安装
- python脚本抢大麦网演唱会门票 ---保姆级教程 python脚本抢大麦网演唱会门票
python脚本抢大麦网演唱会门票 流程: 1.下载并安装anaconda:https://repo.continuum.io/archive/ 下载对应linux/mac/windows版本 2.下 ...
- JavaFx之controlsfx8下载(十七)
JavaFx之controlsfx8下载(十七) controlsfx是JavaFx功能的扩展补充,这里我使用java8,我将源码下载下来并编译好jar,在java8的环境双击运行runSamples ...
- 斯坦福 UE4 C++ ActionRoguelike游戏实例教程 03.EQS初体验:从智障到智慧
斯坦福课程 UE4 C++ ActionRoguelike游戏实例教程 0.绪论 概述 本文章对应课程第十一章 43节.这篇文章会简单介绍EQS和实际上手使用,为AI添加更丰富的行为逻辑. 目录 初识 ...