#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的更多相关文章

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

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

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

  4. Codeforces Round #603 (Div. 2) E. Editor(线段树)

    链接: https://codeforces.com/contest/1263/problem/E 题意: The development of a text editor is a hard pro ...

  5. Codeforces Round #603 (Div. 2)

    传送门 感觉脑子还是转得太慢了QAQ,一些问题老是想得很慢... A. Sweet Problem 签到. Code /* * Author: heyuhhh * Created Time: 2019 ...

  6. Codeforces Round #603 (Div. 2) (题解)

    A. Sweet Problem (找规律) 题目链接 大致思路: 有一点瞎猜的,首先排一个序, \(a_1>a_2>a_3\) ,发现如果 \(a_1>=a_2+a_3\) ,那么 ...

  7. Codeforces Round #603 (Div. 2) A. Sweet Problem(数学)

    链接: https://codeforces.com/contest/1263/problem/A 题意: You have three piles of candies: red, green an ...

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

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

随机推荐

  1. python基礎學習第一天

     python歷史 Python 是一种解释型.面向对象.动态数据类型的高级程序设计语言.Python 由 Guido van Rossum 于 1989 年底在荷兰国家数学和计算机科学研究所设计出来 ...

  2. StringBuilder的性能

    1.新创建一个对象   long startTimeA = System.currentTimeMillis();   StringBuilder sb = null;  for (int i = 1 ...

  3. 【Spring】bean的作用域(@Scope) - singleton、prototype

    已知spring 3+已拥有多种不同的作用域: singleton(默认).prototype.request.session.global session.(参考: spring中scope作用域( ...

  4. 剑指offer-面试题53_1-在排序数组中查找数字-二分查找

    /* 题目: 统计一个数字在排序数组中出现的次数. */ /* 思路: 1.从前往后遍历,时间复杂度O(n). 2.二分查找到目标数字target,向前向后遍历,时间复杂度O(n). 3.利用二分法, ...

  5. XGBoost学习笔记2

    XGBoost API 参数 分类问题 使用逻辑回归 # Import xgboost import xgboost as xgb # Create arrays for the features a ...

  6. Java WebService 简单实例-服务端和客户端

    转载自ITeye:https://www.iteye.com/topic/1135747/

  7. Mybatis的延迟加载和立即加载

    Mybatis的延迟加载和立即加载 示例:在一对多中,当我们有一个用户,他有100个帐户 问题1:在查询用户时,要不要把关联的账户查出来? 问题2:在查询账户时,要不要把关联的用户信息查出来? 问题1 ...

  8. Gitee Git bash VSCode操作简易说明

    GIT Git是一个分布式的版本控制系统,只是软件,需要你下载装到电脑上,实现git功能. Github.Gitee基于git的项目托管平台.Github是国外的,连接速度因人而异:另外Github收 ...

  9. Python语法速查: 14. 测试与调优

    返回目录 本篇索引 (1)测试的基本概念 (2)doctest模块 (3)unittest模块 (4)调试器和pdb模块 (5)程序探查 (6)调优与优化 (1)测试的基本概念 对程序的各个部分建立测 ...

  10. Math Magic ZOJ - 3662

    核心是要想到只枚举最小公倍数的因子 因为转移过程中一单添加了不是最小公倍数的因子,那么结果必然不合法,虽然最终答案是对的,但是这样的答案根本用不上,反而时间复杂度大大增加 #include<cs ...