Codeforces Round #593 (Div. 2) C. Labs A. Stones
题目:https://codeforces.com/contest/1236/problem/A
思路:两种操作收益都是3 且都会消耗b
操作2对b消耗较小 则可优先选择操作2 再进行操作1 即可得到最大值
#include<bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie();
//freopen("in.txt","r",stdin);
int T;cin>>T;
while(T--)
{
int a,b,c;
cin>>a>>b>>c;
)*;
b-=res/;
res+=min(a,b>>)*;
cout<<res<<endl;
}
;
}
Codeforces Round #593 (Div. 2) C. Labs A. Stones的更多相关文章
- Codeforces Round #593 (Div. 2) C. Labs
题目:https://codeforces.com/contest/1236/problem/C 思路:将 n ^ 2 个 lab 平分为 n 个 group group A 和 B 组成的 有序对 ...
- Codeforces Round #593 (Div. 2)
传送门 A. Stones 签到. B. Alice and the List of Presents 单独考虑每个数的贡献即可. 答案为\((2^{m}-1)^n\). C. Labs 构造就类似于 ...
- Codeforces Round #593 (Div. 2) D. Alice and the Doll
题目:http://codeforces.com/problemset/problem/1236/D思路:机器人只能按照→↓←↑这个规律移动,所以在当前方向能够前进的最远处即为界限,到达最远处右转,并 ...
- Codeforces Round #593 (Div. 2)D(螺旋形模拟)
#define HAVE_STRUCT_TIMESPEC#include<bits/stdc++.h>using namespace std;vector<int>po[100 ...
- Codeforces Round #366 (Div. 2) ABC
Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...
- Codeforces Round #354 (Div. 2) ABCD
Codeforces Round #354 (Div. 2) Problems # Name A Nicholas and Permutation standard input/out ...
- Codeforces Round #368 (Div. 2)
直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...
- cf之路,1,Codeforces Round #345 (Div. 2)
cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅..... ...
- Codeforces Round #279 (Div. 2) ABCDE
Codeforces Round #279 (Div. 2) 做得我都变绿了! Problems # Name A Team Olympiad standard input/outpu ...
随机推荐
- Chrome OS支持在窗口中运行Linux了!!!
借助Crouton Chrome扩展,Chrome OS可以在窗口中运行Linux了.在使用该扩展之前,你需要先将自己的Chromebook设置成开发者模式(Develeper Mode). 此前,C ...
- 百度地图POI爬取
我们研究生的课程内容,做下笔记记录一下. 使用的python环境是python3.7 用的图大部分都是老师ppt里的图,懒得自己截了-- 申请百度开发者密匙 (1)注册百度用户,注册过的话,直接登录就 ...
- 浏览器从输入URL到渲染出页面发生了什么
总体来说分为以下几个过程: 1. DNS解析 2. TCP连接 3. 发送HTTP请求 4. 服务器处理请求并返回HTTP报文 5. 浏览器解析渲染页面 6. 连接结束 参考资料:[https:// ...
- LeetCode.997-找到镇法官(Find the Town Judge)
这是悦乐书的第373次更新,第400篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第234题(顺位题号是997).在一个城镇,有N个人从1到N标记.有传言说其中一个人是秘 ...
- windows中eclipse连接虚拟机hdfs
1.修改配置文件core-site.xml,将其中localhost改为虚拟机的ip地址: 在Ubuntu中,打开控制台,使用命令ifconfig查看虚拟机ip,如图: 修改[hadoop安装路径]/ ...
- python 并发编程 协程 gevent模块
一 gevent模块 gevent应用场景: 单线程下,多个任务,io密集型程序 安装 pip3 install gevent Gevent 是一个第三方库,可以轻松通过gevent实现并发同步或异步 ...
- bi的tableau
参考: 官网: https://help.tableau.com/current/server-linux/zh-cn/get_started_server.htm 可视化分析最佳做法: 实用指南 h ...
- PostgreSQL通过解析日志,获取数据库增量变化,pg_recvlogical
1.首先用该工具来看我们的日志变化,需要先将test_decoding插件编译并安装(进入contrib,编译安装即可) 创建一个slot: SELECT * FROM pg_create_logic ...
- MySQL-线上数据迁移实战记录
1. 迁移背景和限制条件 随着功能的迭代或者数据表中数据量的增加,将现有数据进行迁移已是工作中经常遇到的事情.通常我们在平时迁移数据数据的时候,只需要用mysqldump.mysqlimport指令就 ...
- Ubuntu 19.04 下使用Remmina连接window服务器部署maven项目
先将打包好的war包上传到tomcat的webapps目录下 如果配置了tomcat的虚拟路径,那就放进虚拟路径的webapps文件李 修改tomcat安装目录下的conf/server.xml文件 ...