#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. 硬件知识整理part3--电阻在单片机系统中的应用

    邦有道,如矢:邦无道,如矢.  --孔子 电阻在电路中主要功能是限流和分压等等.在单片机系统中自然也是. 电阻作为限流应该是最常用的应用之一,对于单片机外围设计来说,电阻的应用非常重要,在很多时候,我 ...

  2. matlab 中 find() 函数用法

    一. 功能: 寻找非零元素的索引和值 二.相关函数语法: ind = find(X) ind = find(X, k) ind = find(X, k, 'first') ind = find(X, ...

  3. css3基础-动画案例(没啥实用性,纯粹好玩的)

    会动的汉克狗: <!doctype html> <html lang="en"> <head> <meta charset="U ...

  4. Umi 小白纪实(二)—— model 的注册与使用

    Umi 通常会搭配 Dva 使用,用于管理页面状态和逻辑 一.注册 model 首先需要在 .umirc.js 中启用 dva 插件 export default { plugins: [ ['umi ...

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

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

  6. Hibernate注释

    Hibernate注释映射一.PO类的基本注释1.@Entity:将pojo类标记成实体,可以指定一个name属性,指定实体类的名称.默认一该类的类名作为实体类的名称 2.@Table:注释改持久化类 ...

  7. typescript-环境搭建

    这个环境比较简单 搭建 TypeScript 开发环境 什么是 compiler? less 编译器:less EcmaScript 6 编译器:babel TypeScript 编译器:typesc ...

  8. Java后端API调用身份验证的思考

    在如今信息泛滥的数字时代中对产品安全性的要求越来越高了,就比如说今天要讨论的Java后端API调用的安全性,在你提供服务的接口中一定要保证调用方身份的有效性和合法性,不能让非法的用户进行调用,避免数据 ...

  9. css代码实现switch开关滑动

    效果预览: 代码如下: <style> #toggle-button{ display: none; } .button-label{ position: relative; displa ...

  10. liunx 查找locate

    使用 安装 yum install mlocate 更新数据库 updatedb 查找my.cnf文件 locate my.cnf