Codeforences #339 A. Link/Cut Tree
来源:互联网 发布:传说中的梨绯数据 编辑:程序博客网 时间:2024/05/02 10:47
题目传送门
//暴力,有点小坑,不能用pow函数,还有中间注意循环跳出来的条件,不然会在24个test出错//AC代码如下://Created Author: just_sort//Created Time : 2016/1/17//File Name : Link/Cut Tree#include <cstdio>#include <cmath>#include <cstring>#include <iostream>using namespace std;#define ll long longll l,r,k;int main(){ while(~scanf("%I64d%I64d%I64d",&l,&r,&k)) { ll tmp=1; bool flag=false; while(tmp<=r) { if(tmp>=l&&tmp<=r) cout<<tmp<<" ",flag=true; if(tmp>r/k)break; tmp*=k; } if(flag) puts(""); else puts("-1"); } return 0;}
0 0
- Codeforences #339 A. Link/Cut Tree
- A. Link/Cut Tree
- cf#339-A. Link/Cut Tree-水
- 614A Link/Cut Tree
- Codeforces Round #339 (Div. 2) A. Link/Cut Tree
- Codeforces Round #339 (Div. 2) A.Link/Cut Tree
- Codeforces Round #339 (Div. 2) A. Link/Cut Tree
- Codeforces 614 A Link/Cut Tree
- codeforces 614A Link/Cut Tree
- Codeforce 614A Link/Cut Tree 水题
- CodeForces 614A Link/Cut Tree
- codeforces 614A Link/Cut Tree
- codeforces 614 A. Link/Cut Tree
- 【CodeForces】[614A]Link/Cut Tree
- 【SPOJ-QTREE】Query on a tree【Link-Cut Tree】
- 【link-cut tree】
- Link Cut Tree (paint)
- link-cut-tree
- Xcode自定义.h和.m中文件的个性化注释(公司、版本、作者、版权声明等)
- 关于AsyncTask异步任务的见解
- vijos P1097 合并果子
- ThreadLocal类为什么要加上static修饰
- HDOJ2108(Shape of HDU)(叉积的运用)
- Codeforences #339 A. Link/Cut Tree
- iOS 开发学习之 User Interface(11)iOS事件处理机制及手势 与 MVC浅述
- Avro介绍
- Consistent Hashing一致性哈希库libconhash的使用与实现
- c++异常处理
- 解决jetty运行时,出现A full JDK (not just JRE) is required问题
- CSS position 属性:绝对定位与相对定位,以及浮动
- 开源框架KImageLoader开发及原理剖析(一)
- git原始源代码编译