Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #define DEBUG
- using namespace std;
- #define vi vector<int>
- #define watch(x) cout << #x << " is " << x << endl
- int main() {
- ios_base::sync_with_stdio(0);
- cin.tie(NULL);
- cout.tie(NULL);
- long long n, m, k; // count , lose , long
- cin >> n >> m >> k;
- long long posCw = k < n ? k + 1: 2 + k % n; //pos clockwise
- long long posCcw = k < n ? n + 1 - k : n + 1 - k % n; // pos counterclockwise
- if(posCw == m && posCcw == m) {
- cout << "Impossible";
- }
- else if(posCw == k) {
- cout << "Clockwise";
- }
- else {
- cout << "Counterclockwise";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment