题目: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. 谈一谈 Android 的安全机制?

    1.Android 是基于 Linux 内核的,因此 Linux 对文件权限的控制同样适用于 Android,在 Android 中每个应用都有自己的/data/data/包名 文件夹,该文件夹只能该 ...

  2. Eureka入门一(了解概念)

    Eureka注册中心(8761端口) IDEA(开发工具) 1,创建项目勾选Eureka Server 2, 创建yml文件,拷贝配置,下面配置必须为false,意为,该项目不要作为客户端注册,因为本 ...

  3. Reactjs之静态路由、动态路由以及Get传值以及获取

    1.新增知识点 /* react路由的配置: 1.找到官方文档 https://reacttraining.com/react-router/web/example/basic 2.安装 cnpm i ...

  4. Thymeleaf 页面表达式基础

    转自:http://www.cnblogs.com/vinphy/p/4674247.html#undefined (一)Thymeleaf 是个什么?      简单说, Thymeleaf 是一个 ...

  5. IPython基础使用_Round2

    目录 目录 前言 软件环境 Ipython的字符串处理 Ipython的魔力函数Magic lsmagic Output所有魔力函数 查看Magic的源码 env 显示系统环境变量 history 查 ...

  6. bat中if语句的用法

    (作者:sanqima ) 例如,删除“C:\Documents and Settings\Administrator\桌面\T1\txt\批处理实验\unit1”里的a.txt文件,使用if的代码如 ...

  7. Python中转换角度为弧度的radians()方法

    Python中转换角度为弧度的radians()方法 这篇文章主要介绍了Python中转换角度为弧度的radians()方法,是Python入门中的基础知识,需要的朋友可以参考下 radians()方 ...

  8. 针对C++容器类的一个简陋的allocator

    参考: https://en.cppreference.com/w/cpp/named_req/Allocator http://www.josuttis.com/libbook/memory/mya ...

  9. LeetCode.1046-最后的石头重量(Last Stone Weight)

    这是小川的第388次更新,第418篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第250题(顺位题号是1046).有一个石头集合,每个石头都有一个正整数重量值. 每次,我 ...

  10. 基于LVM(逻辑卷管理)的快照原理

    一.为甚么不管多大的逻辑卷进行备份,快照都会在几秒之内完成? 快照在拍摄的一瞬间,系统会记录那个时间点逻辑卷的状态.数据等,此时拍下的快照相当于一张白纸.如图所示 快照做好后,随着时间的推移,源卷里的 ...