题目: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的更多相关文章

  1. Codeforces Round #593 (Div. 2) C. Labs

    题目:https://codeforces.com/contest/1236/problem/C 思路:将 n ^ 2 个 lab 平分为 n 个 group group A 和 B 组成的 有序对 ...

  2. Codeforces Round #593 (Div. 2)

    传送门 A. Stones 签到. B. Alice and the List of Presents 单独考虑每个数的贡献即可. 答案为\((2^{m}-1)^n\). C. Labs 构造就类似于 ...

  3. Codeforces Round #593 (Div. 2) D. Alice and the Doll

    题目:http://codeforces.com/problemset/problem/1236/D思路:机器人只能按照→↓←↑这个规律移动,所以在当前方向能够前进的最远处即为界限,到达最远处右转,并 ...

  4. Codeforces Round #593 (Div. 2)D(螺旋形模拟)

    #define HAVE_STRUCT_TIMESPEC#include<bits/stdc++.h>using namespace std;vector<int>po[100 ...

  5. 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 ...

  6. Codeforces Round #354 (Div. 2) ABCD

    Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/out ...

  7. Codeforces Round #368 (Div. 2)

    直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...

  8. cf之路,1,Codeforces Round #345 (Div. 2)

     cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅.....   ...

  9. Codeforces Round #279 (Div. 2) ABCDE

    Codeforces Round #279 (Div. 2) 做得我都变绿了! Problems     # Name     A Team Olympiad standard input/outpu ...

随机推荐

  1. 第四章 SpringCloud之Eureka-Client实现服务(Jpa,H2)

    1.pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="h ...

  2. Jmeter(一) - 调用数据的参数化

    1. 做性能测试, 不可避免的一点一定会有使用不同的用户密码进行登陆. 如何使登陆用户参数化呢?

  3. ControlTemplate in WPF ——ScrollBar

    <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" x ...

  4. PowerDesigner 入门使用

    <转载于--https://www.cnblogs.com/biehongli/p/6025954.html> PowerDesigner最基础的使用方法入门学习   1:入门级使用Pow ...

  5. Jenkins pipeline+Maven+Gitlab

    参照文档:http://www.cnblogs.com/xiaodai12138/p/9996995.html

  6. asp.net mvc model attribute and razor and form and jquery validate 完美结合

    1.创建Model,添加标注. [Serializable] public class BaseUserModel:BaseModel { [StringLength(100)] [Required( ...

  7. WebApi使用二进制方式上传和下载文件

    using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; usi ...

  8. app测试自动化之打开简书的登录界面,等待五秒后关闭

    from appium import webdriverfrom time import *desired_caps={ -----desired_caps为自定义变量名 'platformName' ...

  9. 【Qt开发】Qt在QLabel(QWidget)鼠标绘制直线和矩形框

    原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://devbean.blog.51cto.com/448512/243546 说实话, ...

  10. HTML简单介绍(个人角度)

    之前对HTML的理解:HTML主要是标签组成,一对标签组成一个位置,在响应的位置内填写对应的内容. 1.编译工具 [ ] HTML需要编译工具?txt文档改后缀双击运行. [ ] 了解前端了一下前端, ...