Advertisement
LEGEND2004

C comp

Jul 25th, 2024
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. #pragma GCC optimize("O3")
  2. #include <bits/stdc++.h>
  3. using namespace std;
  4.  
  5. #define int long long
  6. #define double long double
  7. #define _FastIO ios_base::sync_with_stdio(0); cin.tie(0)
  8. #define F first
  9. #define S second
  10.  
  11. signed main()
  12. {
  13.     _FastIO;
  14.  
  15.     /*
  16.     1974 alinirmi?
  17.     sortlasaq (balacadan boyuye siralasaq)
  18.     1479
  19.  
  20.     ededleri massiv seklinde girekki rahat sortlayaq
  21.     */
  22.  
  23.     int a[4]; // en azi 4 olculu massiv goturmeliyik
  24.     for(int i = 0; i < 4; i++){
  25.         cin >> a[i];
  26.     }
  27.     // ya da cin >> a[0] >> a[1] >> a[2] >> a[3];
  28.     sort(a , a + 4);
  29.  
  30.     // indi en balaca element a[0] sonra a[1] sonra a[2] , en boyuk ise a[3]
  31.     // a[0] == neye ve a[1] == neye ve ... bele bele yazib 1479 beraber oldugunu yoxla ifle
  32. }
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement