Skip to content

Commit 3e7fd3c

Browse files
committed
Added 1385A - Three Pairwise Maximums.cpp
1 parent 50a9df7 commit 3e7fd3c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

1385A - Three Pairwise Maximums.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// ॐ नमः शिवाय
2+
#include<bits/stdc++.h>
3+
using namespace std;
4+
#define ll long long
5+
6+
// Code Written By: Vikash Patel
7+
// Codeforces Profile: https://codeforces.com/profile/vikashpatel
8+
9+
int main()
10+
{
11+
int t;
12+
cin>>t;
13+
while(t--)
14+
{
15+
int a[3];
16+
// for(int i=0; i<3; i++)
17+
// {
18+
// cin>>a[i];
19+
// }
20+
cin>>a[0]>>a[1]>>a[2];
21+
22+
sort(a,a+3);
23+
if(a[1]==a[2]) cout<<"YES"<<endl<<a[2]<<" "<<a[0]<<" "<<a[0]<<endl;
24+
else cout<<"NO"<<endl;
25+
}
26+
return 0;
27+
}

0 commit comments

Comments
 (0)