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+requests+excel接口测试
2018-06-14 17:00:13 环境准备: - Python 3.7 - requests库 - xlrd 1.创建Excel文件 2.读取Excel文件 import xlrd clas ...
- spring ehcache 缓存框架
一.简介 Ehcache是一个用Java实现的使用简单,高速,实现线程安全的缓存管理类库,ehcache提供了用内存,磁盘文件存储,以及分布式存储方式等多种灵活的cache管理方案.同时ehcache ...
- c++ 数据抽象 、封装 接口(抽象类)
一.数据抽象 即,只向外界提供关键信息,并隐藏其后台的实现细节 ———— 一种依赖于接口和实现分离的编程(设计)技术 例如,程序可以调用 sort() 函数,而不需要知道函数中排序数据所用到的算法 c ...
- navicat 系列软件一点击菜单栏就闪退
现象:安装多个版本都出现了闪退的现象 解决方案:后来发现,原来是启动了有道词典屏幕取词才会出现这种现象,关了有道就没事.
- sql语言(mysql)
一.SQL语言 1.DDL (Data Definition Language) 数据库定义语言 2.DML(Data Manipulation Language) 数据库操作语言 3.DQL (Da ...
- c/c++ 链表实现
//链表的基本用法代码实现/************************************************************************/ /* Created: ...
- 注解@Slf4j的作用
lombok.extern.slf4j 代码: @Slf4j public class LogExample { } 产生以下代码: public class LogExample { private ...
- Python 爬取SeeBug poc
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2017-08-24 21:42:52 # @Author : EnderZhou (z ...
- Linux 下文件句柄数的查询学习
1. 查看 所有进程的 打开的句柄数 lsof -n|awk '{print $2}'|sort|uniq -c |sort -nr|more 效果为: 2. 查看某一个进程内的 文件信息 lsof ...
- 引入父目录模块 import
a : a1.py a2.py b : b1.py 其中 a, b 同目录,现在想在b1中引用a1里面内容 在b1中需要进行进行如下操作 x = path.join('..') sys.path.ap ...