Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
29064 while(i++) The Useless Toy C++ 解答错误 10 1 MS 708 KB 852 2022-07-10 19:06:08

Tests(1/10):


#include <iostream> using namespace std; class compare { public: int turn(char a) { switch(a) { case 118: return 0; case 60: return 1; case 94: return 2; case 62: return 3; } } int operator()(char a, char b) { int result = turn(b) - turn(a); result = result < 0 ? result + 4 : result; return result; } }; int main() { char a, b; cin >> a >> b; int time; cin >> time; time %= 4; compare c; if(c(a, b) == c(b, a)) { cout << "undefined" << endl; } else if(c(a, b) == time) { cout << "ccw" << endl; } else { cout << "cw" << endl; } return 0; }


测评信息: