全部评论
大家都a了多少 是不是我太菜了
分享
就a'了积木的。。。。
分享
滴滴
官网直投
输出怎么都不对。。。看不懂了
分享
// 吃葡萄
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int t;
vector<int> grape(3);
usigned ll sum, ans;
cin >> t;
while(t--){
for(int i = 0; i < 3; i++)
cin >> grape[i];
sum = grape[0] + grape[1] + grape[2];
sort(grape.begin(), grape.end());
if(grape[0] + grape[1] >= grape[2]/2){
if(sum % 3)
ans = sum / 3 + 1;
else
ans = sum;
}else{
if(grape[2] % 2)
ans = grape[2] / 2;
else
ans = grape[2] / 2 + 1;
}
cout << ans << endl;
}
}
分享
相关推荐
点赞 评论 收藏
转发
投递中国南方电网等公司9个岗位 >
点赞 评论 收藏
转发