807B T-Shirt Hunt
来源:互联网 发布:大型网络枪战游戏 编辑:程序博客网 时间:2024/06/05 12:39
#include<iostream>#include<vector>#include<string>#include<set>#include<map>#include<algorithm>#include<queue>#include<list>#include<stack>#include<cstdio>#include<fstream>#include<numeric>#include<functional>#include<utility>#include<memory>#include<iomanip>using namespace std;int p, x, y;bool get(int temp){int i = (temp / 50) % 475;int t = 25;while (t >= 1){i = (i * 96 + 42) % 475;if (i + 26 == p) return true;t--;}return false;}int main(){get(20713);while (cin >> p >> x >> y){int temp = x;bool success = false;while (temp >= y){if (get(temp)){success = true;break;}else{temp = temp - 50;}}if (success){cout << "0" << endl;continue;}int increase = 0;while (true){increase++;int temp = x + increase * 100;if (get(temp)) break;temp = temp - 50;if (get(temp)) break;}cout << increase << endl;}return 0;}
阅读全文
0 0
- 807B T-Shirt Hunt
- B. T-Shirt Hunt
- 【Codeforces 807 B. T-Shirt Hunt】
- Codeforces807 B. T-Shirt Hunt
- CF#807 B. T-Shirt Hunt(水题)
- 小白题解 Codeforces 807B T-Shirt Hunt
- Codeforces Round #412 B. T-Shirt Hunt
- codeforces 412 B T-shirt Hunt
- Codeforces Round #412 B. T-Shirt Hunt (暴力枚举)
- codeforces T-Shirt Hunt(傻瓜暴力)
- Codeforces Round #412 (rated, Div. 2, base on VK Cup 2017 Round 3) B. T-Shirt Hunt(模拟)
- CodeForces 799B (B) T-shirt buying
- codeforces round #412 B. T-shirt buying
- Codeforces 799B T-shirt buying 题解
- B. T-shirt buying(stl)
- Codeforces Round #413 B. T-shirt buying
- Codeforces Round #413 B. T-shirt buying
- codeforces #413 B T-shirt buying(set快速查找)
- C++虚函数及其应用
- 计蒜之道初赛第一场-阿里天池的新任务(简单)
- Convert BST to Greater Tree
- 廖雪峰的Git教程一(创建版本库)
- webpack之css-loader
- 807B T-Shirt Hunt
- springBootMVC搭建
- C++11参考资料
- 数据库--(4)
- 递归转二进制
- ArrayList遍历(JAVA)
- uboot位置无关码码
- NOIP2016提高组Day1题解
- C++抽象编程——指针(1)——什么是指针?