#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. 消息队列 ActiveMQ的简单了解以及点对点与发布订阅的方法实现ActiveMQ

    Apache ActiveMQ是Apache软件基金会所研发的开放源代码消息中间件: 由于ActiveMQ是一个纯Java程序,因此只需要操作系统支持Java虚拟机,ActiveMQ便可执行. Act ...

  2. Protobuf用法

    官方文档 什么是 protocol buffer? Protocol buffers are a flexible, efficient, automated mechanism for serial ...

  3. Android一个简单的自定义对话框制作

    布局文件 <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android= ...

  4. [Python]PyCharm在创建py文件时自动添加头部注释

    在Pycharm主界面找到 File ----->> Setting ----->> Editor ----->> File and Code Templates ...

  5. java 相关书籍介绍

    自己做开发也有两年多了吧,其中也关注过许多大牛的博客,买过许多的书看. 自己也是个比较爱阅读的人,从小的时候被老爸逼着每次寒暑假看书,到后来慢慢长大爱上了阅读,习惯了看书. 农村的小孩吗,那时候又不像 ...

  6. Tomcat + mysql + myeclipse 启动遇到的问题

    1. 问题: Tomcat启动时报错如下:Table 'performance_schema.session_variables' doesn't exist 2. 网络上普遍找到的解决办法: 控制台 ...

  7. C#效率优化(4)-- 编译器对数组遍历的优化

    在平时开发过程中,数组是我们使用频率最高的类型之一,在使用定长列表时,数组可以说是最佳方案,这也是我们最熟悉的数据结构之一. 在C#中使用数组,可以获取在内存上连续的相同类型的一组变量,在连续访问时可 ...

  8. 剑指offer-面试题25-合并两个排序的链表-链表

    /* 题目: 输入两个递增排序的链表,合并这两个链表并使新的链表中的节点依然是递增排序. 返回新链表的头节点. */ /* 思路: 1.返回的链表的头节点为两个链表中头节点数值更小的为链表1. 2.进 ...

  9. MST Unification CodeForces - 1108F

    #include<iostream> #include<cstring> #include<algorithm> using namespace std; ; in ...

  10. Building a Space Station POJ - 2031 三维最小生成树,其实就是板子题

    #include<iostream> #include<cmath> #include<algorithm> #include<cstdio> usin ...