Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- ios_base::sync_with_stdio(0);
- cin.tie(0);
- vector<int> v;
- int a;
- while(1)
- {
- cin>>a;
- if(a==0) break;
- else v.push_back(a);
- }
- sort(v.begin(),v.end());
- for(int i = 0; i < v.size()-2; i++)
- {
- if(v[i]+v[i+1]>v[i+2])
- {
- cout<<v[i]<<" "<<v[i+1]<<" "<<v[i+2];
- return 0;
- }
- }
- cout<<"NIE";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement