/* -*- coding: utf-8 -*- * * 1004.cc: No.1004 サイコロの実装 (2) - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ /* typedef */ typedef unsigned int ui; /* global variables */ /* subroutines */ /* main */ int main() { ui a, b, x, n; scanf("%u%u%u%u", &a, &b, &x, &n); ui s = 0, t = 0; if (x & 1) s = n / 2; else t = n / 2; printf("%u %u\n", s, t); return 0; }