Skip to content

Instantly share code, notes, and snippets.

@qjatn0120
Created November 21, 2022 17:42
Show Gist options
  • Save qjatn0120/97acffc9f5ef5b11c114de164ca1c6cc to your computer and use it in GitHub Desktop.
Save qjatn0120/97acffc9f5ef5b11c114de164ca1c6cc to your computer and use it in GitHub Desktop.
#include <bits/stdc++.h>
using namespace std;
int main(){
cin.tie(nullptr), ios::sync_with_stdio(false);
int t, arr[3];
cin >> t;
while(t--){
for(int i = 0; i < 3; i++) cin >> arr[i];
sort(arr, arr + 3);
cout << arr[1] << "\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment