Ahmed_Negm

Untitled

Apr 13th, 2022
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.11 KB | None | 0 0
  1. #include<iostream>
  2. #include<cmath>
  3. #include<iomanip>
  4. #include<algorithm>
  5. #include<cstdlib>
  6. #include<cstring>
  7. #include<vector>
  8. #include<utility>
  9.  
  10. #define ll long long
  11. #define sz(x) int(x.size())
  12. #define all(x) x.begin(),x.end()
  13. using namespace std;
  14.  
  15. void Fast_IO(){
  16.     ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  17.     #ifndef ONLINE_JUDGE
  18.         freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
  19.     #endif
  20. }
  21.  
  22.  
  23.  
  24.  
  25.  
  26. void solve(){
  27.  
  28.  vector<pair<int, int>> p(3);
  29.     for (int i = 0; i < 3; i++)
  30.     {
  31.         cin >> p[i].first >> p[i].second;
  32.     }
  33.     sort(all(p));
  34.  
  35.     cout << 3 << endl;
  36.     cout << p[0].first << ' ' << p[0].second << ' ' << p[1].first << ' ' << p[0].second << '\n';
  37.     cout << p[2].first << ' ' << p[2].second << ' ' << p[1].first << ' ' << p[2].second << '\n';
  38.     cout << p[1].first << ' ' << max({p[0].second, p[1].second, p[2].second}) << ' ' << p[1].first << ' '<< min({p[0].second, p[1].second, p[2].second}) << '\n';
  39. }
  40.  
  41. int main(){
  42.     Fast_IO();
  43. int t =1;
  44. // cin>>t;
  45. while(t--){
  46. solve();
  47. }
  48. return 0;
  49. }  
Advertisement
Add Comment
Please, Sign In to add comment