- #include<bits/stdc++.h>
- using namespace std;
- int a,b,c;
- struct P
- {
- string s;
- int n;
- };
- bool compare(P p1,P p2)
- {
- return p1.n<p2.n;
- }
- int main()
- {
- cin.tie(0);
- cin.sync_with_stdio(0);
- while(cin>>a>>b>>c)
- {
- P p[3];
- p[0].s="A";
- p[0].n=a;
- p[1].s="B";
- p[1].n=b;
- p[2].s="C";
- p[2].n=c;
- sort(p,p+3,compare);
- if(p[0].n+p[1].n>p[2].n)
- cout<<p[1].s<<endl;
- else
- cout<<p[2].s<<endl;
- }
- return 0;
- }
複製代碼 |