Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "bits/stdc++.h"
- using namespace std;
- #define ff first
- #define ss second
- #define pb push_back
- typedef long long ll;
- #define db(x) cerr<<__LINE__<<": "<<#x<<" = "<<(x)<<'\n'
- const int inf = 1e9+7;
- const int N = 1e6+9;
- int main() {
- ios_base::sync_with_stdio(0);
- int A[5];
- for(int i=0;i<4;++i) {
- cin>>A[i];
- }
- sort(A, A+4);
- int s=0;
- for(int i=0;i<3;++i) s+=A[i];
- if(s<=A[3]) cout<<"Invalid.";
- else {
- cout<<"valid";
- int p=A[0], rhom=1;
- for(int i=1;i<4;++i) {
- if(A[i]!=p) rhom=0;
- }
- if(rhom) cout<<", rhombus";
- else cout<<".";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement