Codeforces Round #426 (Div. 2) A. The Useless Toy
来源:互联网 发布:宁波淘宝网店培训 编辑:程序博客网 时间:2024/06/14 20:32
日常水题。模拟什么的随便搞。
#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";}
阅读全文
0 0
- Codeforces Round #426 (Div. 2) A. 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) A. 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) The Useless Toy 数组环
- #426 (Div. 2) A. The Useless Toy
- (模拟)Codeforces Round #426 A. The Useless Toy
- 【CodeForces】426Div2 A The Useless Toy
- Codeforces 834A-The Useless Toy
- Codeforces 834 A The Useless Toy
- CodeForces 834A The Useless Toy
- codeforces 834-A. The Useless Toy
- codeforces 834A The Useless Toy
- 【CodeForces】834A The Useless Toy 水
- Codeforces 843A:The Useless Toy
- 第1章 初识C语言
- 【HDU 1258】Sum It Up(DFS,去重技巧)
- DNS全解析
- Redis集群搭建与简单使用
- python入门
- Codeforces Round #426 (Div. 2) A. The Useless Toy
- maven根据不同的生产环境打包
- 线程互斥
- [PAT乙级]1057. 数零壹(20)
- 代理模式 Prototype
- Codeforces Round #426 (Div. 2) B. The Festive Evening
- bzoj P4870 [Shoi2017]组合数问题
- 从Aop代理的对象中获取源对象
- FMX从TCustomXXX继承控件的子控件,无法同时显示的问题