#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. 50元求解pyqt加载并显示pdf问题

    50块钱求解决pyqt5加载pdf文档并显示,类似briss软件的效果

  2. 删除Win10菜单中的幽灵菜单(ms-resource:AppName/Text )

    新建一个 .bat文件,输入以下内容 @echo off taskkill /f /im explorer.exe taskkill /f /im shellexperiencehost.exe ti ...

  3. 基于90nm CMOS技术的功能齐全的64Mb DDR3 STT-MRAM

    自旋转矩磁阻随机存取存储器(ST-MRAM)有望成为一种快速,高密度的非易失性存储器,可以增强各种应用程序的性能,特别是在用作数据存储中的非易失性缓冲器时设备和系统.为此,everspin开发了基于9 ...

  4. adworld python-trade | python反编译

    附件是.pyc格式的文件. Python程序中,原始程序代码存储在.py文件里,而Python会在执行.py文件的时候,会将.py形式的程序编译成中间式文件(byte-compiled)的.pyc文件 ...

  5. C#浅拷贝与深拷贝测试

    1.浅拷贝与深拷贝 浅拷贝:只复制对象的基本类型,对象类型,仍属于原来的引用.       深拷贝:不紧复制对象的基本类,同时也复制原对象中的对象.就是说完全是新对象产生的. 2.浅拷贝与深拷贝的区别 ...

  6. C++->10.3.5.从键盘上输入职工的编号,从职工信息文件中查找该职工资料,查找成功时显示职工姓名、电话号码,邮政编码和地址。

    p=getchar(); }  printf("\n"); rewind(in);         //文件流指针移到文件开始位置 p=fgetc(in); while(!feof ...

  7. python list comprehensions

    list comprehensions 列表解释 You now have all the knowledge necessary to begin writing list comprehensio ...

  8. gulp常用插件之gulp-notify使用

    更多gulp常用插件使用请访问:gulp常用插件汇总 gulp-notify这是一款gulp通知插件. 更多使用文档请点击访问gulp-notify工具官网. 安装 一键安装不多解释 npm inst ...

  9. 安装Kibana到Linux(源码)

    运行环境 系统版本:CentOS Linux release 7.3.1611 (Core) 软件版本:Kibana-7.1.0 硬件要求:最低2核4GB 安装过程 1.源码安装JDK 1.1.从官网 ...

  10. 带你快速了解Linux文件系统

    http://www.embeddedlinux.org.cn/emb-linux/file-system/201807/03-8197.html 这篇教程将帮你快速了解 Linux 文件系统. 早在 ...