codeforces 312
来源:互联网 发布:网络硬盘录像机16价格 编辑:程序博客网 时间:2024/05/17 13:09
A. Whose sentence is it?
代码:
//codeforces 312 A//2013-05-01-19.12#include <stdio.h>#include <string.h>char str[102];int main(){ int n; scanf("%d", &n); getchar(); while (n--) { int f = 0; int r = 0; gets(str); int l = strlen(str); if (str[0] == 'm' && str[1] == 'i' && str[2] == 'a' && str[3] == 'o' && str[4] == '.') r = 1; if (str[l-5] == 'l' && str[l-4] == 'a' && str[l-3] == 'l' && str[l-2] == 'a' && str[l-1] == '.') f = 1; if ((!f&&!r) || (f && r)) puts("OMG>.< I don't know!"); else if (f && !r) puts("Freda's"); else puts("Rainbow's"); } return 0;}
B. Archer
//codeforces 312 B//2013-05-01-19.51#include <stdio.h>const double inf = 0.00000000001;int main(){ double a, b, c, d; double sw, zw, sl, zl; // snallr win zanoes win and lost while (scanf("%lf %lf %lf %lf", &a, &b, &c, &d) != EOF) { sw = a/b; sl = 1.0 - sw; zw = c/d; zl = 1.0 - zw; double ans = 0; double tmp = 1.0; while(1) { ans += tmp*sw; tmp = tmp*sl*zl; if (tmp < inf) break; } printf("%.12lf\n", ans); } return 0;}
- codeforces 312
- CodeForces 312B--Archer
- Codeforces 312C
- codeforces#312ABC
- CodeForces 312B Archer
- codeforces-312B Archer
- codeforces~~~
- Codeforces
- codeforces
- Codeforces
- codeforces
- codeforces
- Codeforces
- Codeforces
- CodeForces
- CodeForces
- CodeForces
- CodeForces
- [精通WindowsSocket网络开发-基于VC++实现]第四章——阻塞模式开发
- 端口被其他进程占用导致hadoop namenode,datanode,jobTracker,taskTracker,secondnamenode无法启动
- Web安全测试之XSS
- 快速排序算法
- uva11176 - Winning Streak(连续获胜)
- codeforces 312
- 字体大宝库:18款最新发布的免费英文艺术字体
- 转prototype.js中文说明
- SqlServer2008--建立触发器实例
- prototype 中文参数乱码解决方案
- 添加属性页
- Python yield 使用浅析
- The C++ Programing Language读书笔记之(1):Advise
- Downloaded Files for 11i and R12