Codeforces Round #426 (Div. 2) A. The Useless Toy
2017-07-31 01:04
736 查看
日常水题。模拟什么的随便搞。
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int read() { char ch=getchar();int f=0; while(ch<'0'||ch>'9') ch=getchar(); while(ch>='0'&&ch<='9') {f=f*10+(ch^48);ch=getchar();} return f; } int k,t; int main() { char x,y; cin>>x>>y; if(x=='^') k=0; else if(x=='>') k=1; else if(x=='v') k=2; else k=3; if(y=='^') t=0; else if(y=='>') t=1; else if(y=='v') t=2; else t=3; //cout<<k<<" "<<t<<endl; int f=read(); f%=4; if((k+f)%4==t&&((k-f)%4+4)%4!=t) cout<<"cw"; else if(((k-f)%4+4)%4==t&&(k+f)%4!=t) cout<<"ccw"; else cout<<"undefined"; }
相关文章推荐
- Codeforces Round #426 (Div. 2) The Useless Toy
- Codeforces Round #426 (Div. 2)-A. The Useless Toy
- Codeforces Round #426 (Div. 2) A The Useless Toy
- Codeforces Round #426 (Div. 2) The Useless Toy 数组环
- Codeforces Round #426 (Div. 2) A The Useless Toy
- Codeforces Round #426 (Div. 2) A. The Useless Toy
- #426 (Div. 2) A. The Useless Toy
- 【Codeforces Round #426 (Div. 2) A】The Useless Toy
- Codeforces Round #250 (Div. 1) A. The Child and Toy 水题
- CodeForces #426 div2 A The Useless Tony
- Codeforces #250 (Div. 2) C.The Child and Toy
- Codeforces Round #250 Div. 2(C.The Child and Toy)
- Codeforces Round #250 (Div. 1) A. The Child and Toy
- Codeforces 843A:The Useless Toy
- Codeforces 834A-The Useless Toy
- Codeforces 834A - The Useless Toy
- Codeforces Round #250 (Div. 2)C. The Child and Toy(贪心)
- CodeForces 834 A.The Useless Toy(水~)
- Codeforces Round #250 (Div. 2)C. The Child and Toy(贪心)
- (模拟)Codeforces Round #426 A. The Useless Toy