Codeforces Round #603 (Div. 2) A.Sweet Problem
#include <cstdio>
#include <algorithm>
using namespace std;
int main() {
int t;
scanf("%d", &t);
while (t--) {
int r, g, b;
scanf("%d %d %d", &r, &g, &b);
int sum = r + g + b;
int maxn = max(r, g);
maxn = max(maxn, b);
if (sum - maxn <= maxn)
printf("%d\n", sum - maxn);
else
printf("%d\n", (sum - * maxn) / + maxn);
}
return ;
}
Codeforces Round #603 (Div. 2) A.Sweet Problem的更多相关文章
- Codeforces Round #603 (Div. 2) A. Sweet Problem(水.......没做出来)+C题
Codeforces Round #603 (Div. 2) A. Sweet Problem A. Sweet Problem time limit per test 1 second memory ...
- Codeforces Round #603 (Div. 2) A. Sweet Problem 水题
A. Sweet Problem the first pile contains only red candies and there are r candies in it, the second ...
- Codeforces Round #603 (Div. 2) E. Editor 线段树
E. Editor The development of a text editor is a hard problem. You need to implement an extra module ...
- Codeforces Round #603 (Div. 2) E. Editor(线段树)
链接: https://codeforces.com/contest/1263/problem/E 题意: The development of a text editor is a hard pro ...
- Codeforces Round #603 (Div. 2)
传送门 感觉脑子还是转得太慢了QAQ,一些问题老是想得很慢... A. Sweet Problem 签到. Code /* * Author: heyuhhh * Created Time: 2019 ...
- Codeforces Round #603 (Div. 2) (题解)
A. Sweet Problem (找规律) 题目链接 大致思路: 有一点瞎猜的,首先排一个序, \(a_1>a_2>a_3\) ,发现如果 \(a_1>=a_2+a_3\) ,那么 ...
- Codeforces Round #603 (Div. 2) A. Sweet Problem(数学)
链接: https://codeforces.com/contest/1263/problem/A 题意: You have three piles of candies: red, green an ...
- Codeforces Round #358 (Div. 2) B. Alyona and Mex 水题
B. Alyona and Mex 题目连接: http://www.codeforces.com/contest/682/problem/B Description Someone gave Aly ...
- Codeforces Round #298 (Div. 2) A. Exam 构造
A. Exam Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/534/problem/A Des ...
随机推荐
- 【Mac电脑新手技巧】苹果电脑如何更换用户头像?
想给Mac电脑换一个喜欢的用户头像?苹果电脑的用户头像如何更换? 对于很多Mac小白来说,给自己的Mac换一个可心的用户头像很是必要.但是,大多数Mac新手都觉得无从下手!如果你也想给自己的Mac换一 ...
- 【MVC】Scripts.Render的用法
一.配置BundleConfig.cs文件 1.首先要在App_Start 里面BundleConfig.cs 文件里面 添加要包含的css文件2.BundleConfig就是一个微软新加的 一个打包 ...
- 学习R语言的一点小心得
1.目前R 语言处于入门阶段吧,能够执行一些简单的模型了,还是有收获的. 但是在跑模型的时候经常遇到各种各样的错误,最常见的错误就是数据带入模型之后,数据的类型不对,因此模型跑不下去,因此说,利用he ...
- Java【第一课 java基本结构】
一.java基本结构 上面是java的基本组成,包括外层的框架.java入口程序框架 二.java的第一个程序 首先创建一个文件,名字叫做helloworld.java,后缀名为java public ...
- HashMap (JDK1.8) 分析
一.HashMap(JDK1.8) 1.基本知识.数据结构 (1)时间复杂度:用来衡量算法的运行时间. 参考:https://blog.csdn.net/qq_41523096/article/det ...
- JavaSE学习笔记(9)---集合类和泛型
JavaSE学习笔记(9)---集合类和泛型 1.Collection集合 集合概述 在前面我们已经学习过并使用过集合ArrayList<E> ,那么集合到底是什么呢? 集合:集合是jav ...
- nunjucks如何使用?
基本的使用 const nunjucks = require('nunjucks') // nunjucks.configure({ autoescape: true }); // const res ...
- [转]Maven的pom.xml文件详解
Maven的pom.xml文件详解------Build Settings 2013年10月30日 13:04:01 阅读数:44678 根据POM 4.0.0 XSD,build元素概念性的划分为两 ...
- Linux网络课程学习第四天
课程内容包括:管道符.重定向与环境变量. 学习心得:个人感觉本章节还是不太好理解,尤其是对自己的基础还不是特别的扎实课余时间还是要反复的复习.
- Wannafly Winter Camp 2020 Day 5J Xor on Figures - 线性基,bitset
有一个\(2^k\cdot 2^k\) 的全零矩阵 \(M\),给出 \(2^k\cdot 2^k\) 的 \(01\) 矩阵 \(F\),现在可以将 \(F\) 的左上角置于 \(M\) 的任一位置 ...