FEgor04

Untitled

Sep 14th, 2019
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #define DEBUG
  3. using namespace std;
  4.  
  5. #define vi vector<int>
  6. #define watch(x) cout << #x << " is " << x << endl
  7.  
  8. int main() {
  9.     ios_base::sync_with_stdio(0);
  10.     cin.tie(NULL);
  11.     cout.tie(NULL);
  12.     long long n, m, k; // count , lose , long
  13.     cin >> n >> m >> k;
  14.     long long posCw = k < n ? k + 1: 2 + k % n; //pos clockwise
  15.     long long posCcw = k < n ? n + 1 - k : n + 1 - k % n; // pos counterclockwise
  16.     if(posCw == m && posCcw == m) {
  17.         cout << "Impossible";
  18.     }
  19.     else if(posCw == k) {
  20.         cout << "Clockwise";
  21.     }
  22.     else {
  23.         cout << "Counterclockwise";
  24.     }
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment