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 ...
随机推荐
- nodejs之简单应用与运行
1.nodejs第一个应用,入口函数为http.createServer() var http=require('http');//1.引入 http 模块 //2.用 http 模块创建服务 htt ...
- fiddler查看http压缩格式传输的报文
1.当传输的报文比较大时,http一般会采取压缩的格式(如gzip)传输(支持编码:Accept-Encoding: gzip, deflate, br).2.当采用压缩格式编码传输时,直接在raw中 ...
- fiddler配置会话框菜单栏
1.添加会话框菜单:鼠标移至会话框菜单的左上角“#”位置,右键>Customize column,Collection下拉菜单选择"Miscellaneous",Field ...
- apache禁止php解析--安全
#禁止解析php <Directory "/data/www/data/"> php_admin_flag engine off <filesmatch &quo ...
- 阶段3 2.Spring_04.Spring的常用注解_7 改变作用范围以及和生命周期相关的注解
Scope 改成多例 PreDestory和PostConstruct PreDestory和PostConstruct这两个注解了解即可 增加两个方法,分别用注解 没有执行销毁方法. 如果你一个子类 ...
- 40组合总和II
题目:给定一个数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合.candidates 中的每个数字在每个组合中只能使用一 ...
- mingw gcc 静态 static 编译 dav1d libdav1d.a
export CC=/mingw/bin/gcc export CXX=/mingw/bin/g++ meson --prefix "/usr/local" build --bui ...
- WPF DispatcherTimer GC回收
static DispatcherTimer GCTimer = new DispatcherTimer(); public static void BeginGC() { GCTimer.Inter ...
- MySQL 数据库下载
地址链接: msi:https://dev.mysql.com/downloads/installer/ zip:https://downloads.mysql.com/archives/commun ...
- vmnet2访问外网
1.vmnet2用于内网之间的访问,外部网络访问不了它.它可以访问外网,要想访问外网就必须有真实主机共享网络给它 2.[root@localhost ~]# vim /etc/sysconfig/ne ...