Advertisement
ismail5g

Untitled

Feb 10th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.39 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. /// Typedef
  6. typedef long long           ll;
  7. typedef unsigned long       ul;
  8. typedef unsigned long long  ull;
  9. typedef vector<int>         vi;
  10. typedef vector<vi>          vvi;
  11. typedef vector<ll>          vll;
  12. typedef pair<int,int>       pii;
  13. typedef pair<ll,ll>         pll;
  14. typedef vector< pii >       vii;
  15.  
  16. #define pb                  push_back
  17. #define ppb                 pop_back
  18. #define MP                  make_pair
  19. #define ff                  first
  20. #define ss                  second
  21. #define sf                  scanf
  22. #define pf                  printf
  23. #define SQR(x)              ((x)*(x))
  24. #define loop(i, y)          for(int i=0; i<int(y); i++)
  25. #define FOR(i, x, y)        for(int i=int(x); i<int(y); i++)
  26. #define ROF(i, x, y)        for(int i=int(x); i>=int(y); i--)
  27. #define ALL(c)              c.begin(), c.end()
  28. #define SZ(c)               int(c.size())
  29. #define CLR(x, y)           memset(x, y, sizeof(x))
  30. #define READ(f)             freopen(f, "r", stdin)
  31. #define WRITE(f)            freopen(f, "w", stdout)
  32. #define FastIO              ios_base::sync_with_stdio(false)
  33. #define tr(it, container)   for(auto it = container.begin(); it != container.end(); it++)
  34. #define sci(x)              scanf("%d", &x)
  35. #define scii(x, y)          scanf("%d %d", &x, &y)
  36. #define sciii(x, y, z)      scanf("%d %d %d", &x, &y, &z)
  37. #define scl(x)              scanf("%lld", &x)
  38. #define scll(x, y)          scanf("%lld %lld", &x, &y)
  39. #define sclll(x, y, z)      scanf("%lld %lld %lld", &x, &y, &z)
  40. #define bitCheck(N,in)      ((bool)(N&(1<<(in))))
  41. #define bitOff(N,in)        (N&(~(1LL<<(in))))
  42. #define bitOn(N,in)         (N|(1LL<<(in)))
  43. #define bitFlip(a,k)        (a^(1LL<<(k)))
  44. #define unq(v)              sort(all(v)), (v).erase(unique(all(v)),v.end())
  45. #define common(a,b)         sort(all(a)), sort(all(b)), a.erase(set_intersection(all(a),all(b),a.begin()),a.end())
  46. #define uncommon(a,b)       sort(all(a)), sort(all(b)), a.erase(set_symmetric_difference(all(a),all(b),a.begin()),a.end())
  47. #define dbg(x)              cout<<#x<<" = "<<x<<endl;
  48. // template <typename T> using orderset = tree <T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update>;
  49. // *X.find_by_order(k) //returns the kth largest element.(0-based)
  50. // X.order_of_key(val) //returns the no. of values less than val
  51.  
  52. // uniform random generator -->
  53. // uniform_int_distribution<int> dist(0, 1);
  54. // default_random_engine gen;
  55.  
  56. template <class T> inline T bigMod(T p,T e,T M){ ll ret = 1; for(; e > 0; e >>= 1){ if(e & 1) ret = (ret * p) % M; p = (p * p) % M; } return (T) ret;}
  57. template <class T> inline T modInverse(T a,T M){return bigMod(a,M-2,M);}
  58. template <class T> inline T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
  59. template <class T> inline T lcm(T a,T b) {a=abs(a);b=abs(b); return (a/gcd(a,b))*b;}
  60. template <class T> inline string int2String(T a){ostringstream str; str<<a; return str.str();}
  61. const int dr[] = { 0,  1,  0, -1,        -1,  1,  1, -1,     -2, -2,  2,  2, -1, -1,  1,  1};
  62. const int dc[] = { 1,  0, -1,  0,         1,  1, -1, -1,     -1,  1, -1,  1, -2,  2, -2,  2};
  63.  
  64.  
  65. /// Constants
  66. #define max                 10000007
  67. #define MOD                 1000000009
  68. #define base                1000000007
  69. #define eps                 1e-9
  70. #define INF                 1llu<<61    // 2,305,843,009,213,693,952
  71. #define inf                 1<<29       // 536,870,912
  72. #define PI                  acos(-1.0)  // 3.1415926535897932
  73. #include<stdio.h>
  74. #include<math.h>
  75. #define SIZE 100005
  76.  
  77.  
  78. int status[100000005];
  79. vector<int>prime;
  80. void seive(){
  81.     for(int i=4; i<100000005; i+=2) status[i]=1;
  82.     for(int i=3; i*i<=100000005; i+=2){
  83.         if(status[i]==0){
  84.             for(int j=i*i; j<100000005; j+=(i+i)){
  85.                 status[j]=1;
  86.             }
  87.         }
  88.     }
  89.     for(int i=2; i<100000005; i++) if(!status[i]) prime.push_back(i);
  90. }
  91.  
  92. vi arr;
  93.  
  94. int main()
  95. {
  96.     //ll a, b, c, d, e, f, g, h;
  97.     int a, b, c, d,q, r=1, f=0, g, h, e;
  98.     cin>>a>>b>>c;
  99.     if(a>b && b<=c)printf(":)\n");
  100.     else if(a<b && b>=c)printf(":(\n");
  101.     else if(a<b && b<c && (b-a)>(c-b))printf(":(\n");
  102.     else if(a<b && b<c && (b-a)<=(c-b))printf(":)\n");
  103.     else if(a>b && b>c && (a-b)>(b-c))printf(":)\n");
  104.     else if(a>b && b>c && (a-b)<=(b-c))printf(":(\n");
  105.     else if(a==b){
  106.         if(b<c)printf(":)\n");
  107.         else printf(":(\n");
  108.     }
  109.     return 0;
  110. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement