URAL 1731. Dill(数学啊 )】的更多相关文章

题目链接:http://acm.timus.ru/problem.aspx?space=1&num=1731 1731. Dill Time limit: 0.5 second Memory limit: 64 MB Ivan Vasil'evich likes to work in his garden. Once he heard that dill was a very beautiful and healthy crop and planted his whole garden with…
A centipede has 40 left feet and 40 right feet. It keeps a left slippers and b right slippers under its bed. Every morning the centipede puts on the slippers. It pokes its first left foot under the bed and puts on a random slipper, doing it in one se…
题目链接:space=1&num=1820" target="_blank">http://acm.timus.ru/problem.aspx? space=1&num=1820 1820. Ural Steaks Time limit: 0.5 second Memory limit: 64 MB After the personal contest, happy but hungry programmers dropped into the rest…
ural 2029 Towers of Hanoi Strike Back 链接:http://acm.timus.ru/problem.aspx?space=1&num=2029 题意:汉诺塔问题,给定一串只有(A, B, C)的字符串(A代表在第一根柱子,B代表在第二根柱子,C代表在第三根柱子),从前往后代表盘子的大小,第 i 个字母代表di i 个盘子在某个柱子上.问移动给定字母状态的盘子最少需要多少步. 思路:首先,从后往前看(最大的盘子),如果不在当前柱子上,那么移动到目标柱子需要 2…
ural 2032  Conspiracy Theory and Rebranding 链接:http://acm.timus.ru/problem.aspx?space=1&num=2032 题意:给定一个三角形的三条边 (a, b, c),问是否可放在二维坐标,使得3个顶点都是整数点.若可以,输出任意一组解,否则,输出 -1. 思路:暴力枚举:以 a 为半径做第一象限的 1/4 圆, 以 b 为半径做 一.四 象限的半圆,存储整数点的解,暴力枚举 a 整数点与 b 整数点是否构成长度为 c…
Our chemical biologists have invented a new very useful form of life called stripies (in fact, they were first called in Russian - polosatiki, but the scientists had to invent an English name to apply for an international patent). The stripies are tr…
题意:给定 n 个人,每个人两个值s, r,要满足,p(v, u) = sqrt((sv − su)^2 + (rv − ru)^2), p(v,u,w) = (p(v,u) + p(v,w) + p(u,w)) / 2 要求找出p(v, u) ≥ p(v,u,w) 的对数,其中w是除u,v外,任意的人. 析:化简一下这个表达式,这很明显是两边之和小于等于第三边,好像挺熟悉啊,对,三角形是两边之和大于第三边,现在是小于,不可能,只能是等于,要想等于, 那么只是共线了,并且w是任何人,所以这些点全…
题目链接:space=1&num=1725" target="_blank">http://acm.timus.ru/problem.aspx?space=1&num=1725 Every fall, all movies are shown to a full house at one of the most popular cinema theatres in Yekaterinburg because students like to spend…
主题链接:http://acm.timus.ru/problem.aspx?space=1&num=1727 1727. Znaika's Magic Numbers Time limit: 0.5 second Memory limit: 64 MB Znaika has many interests. For example, now he is investigating the properties of number sets. Znaika writes down some set…
In Chinese Restaurant 题目连接: http://acm.hust.edu.cn/vjudge/contest/123332#problem/B Description When Vova arrived in Guangzhou, his Chinese friends immediately invited him to a restaurant. Overall n people came to the restaurant, including Vova. The w…