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 ...
随机推荐
- python + 爬虫 + fiddler + 夜神模拟器 爬取app(1)
抓包 抓包是爬虫里面经常用到的一个词,完整的应该叫做抓取数据请求响应包 ,而Fiddler这款工具就是干这个的 普通https抓包设置 打开Fiddler ------> Options .然后 ...
- Tutorial : Implementing Django Formsets
A step-by-step tutorial for setting up and testing a standard Django formset. I’ve noticed on #djang ...
- vue-蒙层弹窗里的内容滚动。外层大页面禁止滚动
此需求 有两种方法,第一种,这种方法适用于,底层 和弹窗是两个平行的没有关系的两部分.重叠(https://blog.csdn.net/yuhk231/article/details/741717 ...
- backbone.js 教程(1) View & Model & Collection
Backbone.js Overview 它由Jeremy Ashkenas开发,最初发行于2010-10-13 它是一个轻量的JavaScript类库,只依赖于underscore.js,非强制依赖 ...
- djangourl进阶
- ElasticSearch 7.3.0 查询、修改、删除 文档操作
PUT chuyuan/_doc/ { "name":"xiaolin", , "sex":"F", "lov ...
- 数组转字符串,字符串转数组 join(), split();
join() join() 方法用于把数组中的所有元素放入一个字符串. 元素是通过指定的分隔符进行分隔的. arrayObject.join(separator), 默认为使用逗号分隔 var ar ...
- ubuntu修改时间为北京时间
ubuntu修改时间为北京时间 查看当前时区root@ubuntu:/# date -R修改时区root@ubuntu:/# tzselect复制文件到/etc目录下root@ubuntu:/# cp ...
- Kick Start 2019 Round D
X or What? 符号约定: $\xor$ 表示异或. popcount($x$) 表示非负整数 $x$ 的二进制表示里数字 1 出现的次数.例如,$13 = 1101_2$,则 popcount ...
- easyUI关键(常见)组件详解
一.easyUI 相关介绍 1.EasyUI 是前端框架,封装大量 css和封装大量 JS 2.使用前端框架时,给标签定义class 属性,就会有样式和脚本功能了(class属性对应了相关封装过的cs ...