codeforces 834-A. The Useless Toy
来源:互联网 发布:双子星网上交易软件 编辑:程序博客网 时间:2024/05/21 11:06
点这里
没看见空格。。一直找错。。
水题
#include <iostream>#include <stdio.h>using namespace std;char tt1[5]="v<^>";char tt2[5]="v>^<";char tt3[5];int main(){ while(gets(tt3)!=NULL) { int d,f1=0,f2=0; scanf("%d",&d); getchar(); d%=4; for(int i=0; i<4; i++) { if(tt3[0]==tt1[i]) { if(tt1[(i+d)%4]==tt3[2]) f1=1; break; } } for(int i=0; i<4; i++) { if(tt3[0]==tt2[i]) { if(tt2[(i+d)%4]==tt3[2]) f2=1; break; } } if((f1&&f2)||(!f1&&!f2)) puts("undefined"); else if(f1==1) puts("cw"); else puts("ccw"); } return 0; }
阅读全文
0 0
- 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 水
- 834A. The Useless Toy
- CodeForces 834 A.The Useless Toy(水~)
- 【CodeForces】426Div2 A The Useless Toy
- Codeforces 843A:The Useless Toy
- A. The Useless Toy
- A. The Useless Toy
- CF 834A-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 A. The Useless Toy
- Codeforces Round #426 (Div. 2) A. The Useless Toy
- 分数拆分
- 暑假集训 T3 与非
- c++ delete与new
- 筛选法查找100以内的素数
- CSS动画学习
- codeforces 834-A. The Useless Toy
- javascript 复制内容到剪切板
- 小技巧-解决电脑文件名太长显示不完整问题
- Mysql简介
- Python实现对Android截图
- L
- Lua入门
- [Python]打印实参名
- QObject的Thread Affinity翻译