题目链接:uva 11657 - Rational Billiard
题目大意:给定一个边界M,N,以及第一个球和第二个球的位置,第一个球以p,q的方向移动,碰到边界后被反弹,和光线的路线一致,问有没有可能集中第二个球。
解题思路:在网上参考别人的思路,首先将横纵坐标扩大相应倍数,保证p,q每移动一次对应在新平面为单位长度,然后只需要考虑横向移动所需要的步数,减掉纵向移动所需的步数后,...
分类:
其他好文 时间:
2014-08-04 11:03:37
阅读次数:
179
Administrator has detected that this is a terminal server session.Administrator does not support running in this environment. Click OK to exit.解决办法htt...
分类:
其他好文 时间:
2014-08-01 19:37:22
阅读次数:
181
安装了IBM Rational Rhapsody for Java 8.1 64bit,试用反向工程,提示64位的不支持反向工作,要安装32位的。...
分类:
其他好文 时间:
2014-07-29 13:16:37
阅读次数:
202
这么好的东西,不拿来出分享,我对不起原作者呀。可是我这里不知道作者是谁,感谢在先了。ed2k://|file|%5BIBM%E8%BD%AF%E4%BB%B6%E7%B3%BB%E5%88%97%5D.IBM.Rational.Rose.Enterprise.v7.0-TFTISO.bin|6210...
分类:
其他好文 时间:
2014-07-26 01:06:56
阅读次数:
162
Farey SequenceTime Limit:1000MSMemory Limit:65536KDescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational nu...
分类:
其他好文 时间:
2014-07-24 22:53:03
阅读次数:
211
在类型转换时常会遇到隐式转换和显式转换。那我们自定义的类型要如何去定义隐式转换和显式转换?我们来看一段代码
public class Rational
{
private Int32 _inner_int = 0;
public Rational()
{
}
public Rational(Int32...
分类:
其他好文 时间:
2014-07-23 13:24:56
阅读次数:
177
DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gcd(a,b) = 1 arr...
分类:
其他好文 时间:
2014-07-22 00:20:35
阅读次数:
283
这一讲我们集中讲解类和他的一些特性.首先我们从自定义一个有理数类来开始.
在C语言中有一个关键字: struct ,用来创建一个结构体类型.但是在C++中这个关键的含义就不仅仅如此了,下面我们可以看下示例:
/// Represent a rational number.
struct rational
{
int numerator; ///< numerator gets th...
分类:
编程语言 时间:
2014-07-18 11:31:36
阅读次数:
422
执行Rational Rose的时候假设出现这种错误,先检查环境变量有没有common的地址,假设没有直接配上就OK;配置例如以下:D:\Program Files\Rational\Common; 我的win7直接使用大写的Common路径没有出现以下资料说的问题;假设有的能够依照以下资料再次改动...
分类:
其他好文 时间:
2014-07-15 09:38:30
阅读次数:
278
经验:当我们编写一个 class template, 而它所提供之"与此 template 相关的"函数支持"所有参数之隐式类型转换"时,请将那些函数定义为 "class template内部的 friend 函数"。
示例:
template
class Rational{
public:
Rational(const T &numerator = 0, const T &denominator = 1) // Item 20 对于自定义类型以passed by referenc...
分类:
编程语言 时间:
2014-07-14 13:52:39
阅读次数:
173