思维:思维就是将大的矩形放在小矩形里面,让大矩形的宽和长尽量靠近. 很容易得到 (a+b)% i = 0 的话, 保证了大矩形的形成,同时里面表示了两种情况:1, a % i =0, b % i=0; 2, (a%i + b % i) % i =0 当然,第一种情况是第二种的特殊情况,但是,我还是想把它写出来, 同时, 这个 i 必须大于 a和 b共同的 第一个 因子(不必是共同因子,第一的顺序是只从大到小的顺序中第一次大于等于)至于,为什么自己可以画画图,就很明白了.当然,要证明的话,直…
UVa10025 ? 1 ? 2 ? ... ? n = k problem The problem Given the following formula, one can set operators '+' or '-' instead of each '?', in order to obtain a given k? 1 ? 2 ? ... ? n = k For example: to obtain k = 12 , the expression to be used will be:…
B. Tell Your World time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Connect the countless points with lines, till we reach the faraway yonder. There are n points on a coordinate plane, the i…
2019 杭电多校 8 1003 题目链接:HDU 6659 比赛链接:2019 Multi-University Training Contest 8 Problem Description Acesrc is a famous mathematician at Nanjing University second to none. Playing with interesting numbers is his favorite. Today, he finds a manuscript whe…
F. Video Cards time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Little Vlad is fond of popular computer game Bota-2. Recently, the developers announced the new add-on named Bota-3. Of course…