0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-10 02:58:48 +00:00

P2911 [USACO08OCT] Bovine Bones G

R36448329
This commit is contained in:
Baoshuo Ren 2020-08-06 01:44:24 +08:00 committed by Baoshuo Ren
parent 4f5c47bea7
commit abd327c672
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

21
problem/P2911/P2911.cpp Normal file
View File

@ -0,0 +1,21 @@
// RR36448329
#include <bits/stdc++.h>
using namespace std;
int s1, s2, s3;
int main() {
scanf("%d%d%d", &s1, &s2, &s3);
if(s3 > s1 + s2) {
printf("%d", s1+s2+1);
} else if(s2 > s1 + s3) {
printf("%d", s1+s3+1);
} else if(s1 > s3 + s2) {
printf("%d", s3+s2+1);
} else {
printf("%d", (s1+s2+s3+3)/2);
}
return 0;
}