Codeforces Round #430 (Div. 2) A. Kirill And The Game
2017-08-30 14:54
543 查看
是否存在,l<=a<=r,a*k==b,x<=b<=y.
暴力模拟,不要企图o(1)算。
暴力模拟,不要企图o(1)算。
#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 main() { long long l,r,x,y,k; cin>>l>>r>>x>>y>>k; for(int i=x;i<=y;i++) { if(i*k>=l&&i*k<=r) { printf("YES"); return 0; } } puts("NO"); return 0; }
相关文章推荐
- 【 Codeforces Round #430 (Div. 2) A 】 Kirill And The Game
- Codeforces Round #430 A. Kirill And The Game
- Codeforces Round #430 (Div. 2) E. Nikita and game
- Codeforces Round #430 (Div. 2) C. Ilya And The Tree dfs+set
- Codeforces Round #430 (Div. 2) C. Ilya And The Tree dfs+set
- Codeforces Round #430 (Div. 2)-搜索&STL-Ilya And The Tree
- Codeforces Round #430 (Div. 2) C. Ilya And The Tree dfs+set
- Codeforces Round #430 (Div. 2) C. Ilya And The Tree dfs+set
- Codeforces Round #430 (Div. 2) C. Ilya And The Tree dfs+set
- Codeforces Round #430 (Div. 2) C. Ilya And The Tree 树dp 统计
- Codeforces Round #430 (Div. 2) C. Ilya And The Tree dfs+set
- Codeforces Round #430 (Div. 2) - C. Ilya And The Tree (树形DFS)
- Codeforces Round #430 (Div. 2) C. Ilya And The Tree dfs+set
- Codeforces Round #430 (Div. 2) C Ilya And The Tree SET暴力
- Codeforces Round #430 (Div. 2) C. Ilya And The Tree dfs+set
- Codeforces Round #430 (Div. 2) C. Ilya And The Tree
- Codeforces Round #430 (Div. 2) C. Ilya And The Tree(dfs)
- Codeforces Round #430 (Div. 2) C. Ilya And The Tree
- Codeforces Round #430 (Div. 2) 842C Ilya And The Tree(暴力)
- Codeforces Round #430 (Div. 2) C. Ilya And The Tree(补题)