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 ...
随机推荐
- android 面试汇总<一>
1.1 Android Activity Q:说下Activity的生命周期? 技术点:Activity生命周期 思路:分条解释Activity从创建到销毁整个生命周期中涉及到的方法及作用 参考回答: ...
- Oracle中如何生成随机数字、随机字符串、随机日期
.随机小数 dbms_random.value(low,high): --获取一个[low,high)之间的小数,包含low,不包含high 可以结合trunc函数获取整数 例如: select db ...
- global和nonlocal的用法
1 nonlocal声明的变量不是局部变量,也不是全局变量,而是外部嵌套函数内的变量.写在内部嵌套函数里面,它实质上是将该变量定义成了全局变量,它等价于用两个global来定义该变量.只不过用两个gl ...
- python-unittest模块中的各类断言
unittest中断言主要有三种类型: 基本的布尔断言,即:要么正确,要么错误的验证 比较断言,如比较两个变量的值(跟上面的布尔断言区别不大,主要是通过比较两个变量的值得出布尔值) 复杂断言(一般用的 ...
- Linux (1)
@https://blog.csdn.net/mayi_xiaochaun这人博客里有一系列linux教程 @linux中,文件名最前加/ 比如 cd /usr/local是绝对路径 若#前显示当前 ...
- 【VS开发】如何移植对话框?
[VS开发]如何移植对话框? 标签:[VS开发] 问题描述:当开发好一个可视化界面的时候,想将其移植到另外的工程中,这个时候希望能够导出对话框资源,好直接在另一个工程中进行编辑,而不用再次编辑对话框上 ...
- Redis数据类型Strings、Lists常用操作指令
Redis数据类型Strings.Lists常用操作指令 Strings常用操作指令 GET.SET相关操作 # GET 获取键值对 127.0.0.1:6379> get name (nil) ...
- spring boot-2.Hello world
由于 个人习惯,我选择使用STS来作为开发工具.跳过手动构建spring boot 项目的环节,直接使用向导创建spring boot 项目. 1.创建spring boot项目 File ----& ...
- Spring MVC 启动报错
Tomcat 启动Spring MVC工程报如下错误 java.lang.ClassNotFoundException: org.springframework.web.context.Context ...
- jquery validate 自定义校验方法
1.引入JS jquery.min.js jquery.validate.min.js messages_zh.min.js 2.添加验证方法,第一个参数为验证方法的名称,第二个参数为验证方法. $. ...