Size: a a a

Сообщество Python Программистов

2021 January 02

N

NS in Сообщество Python Программистов
i have one problem can somone help me?
источник

N

NS in Сообщество Python Программистов
In the Byteotian Rope Park, an overview of trees, one behind the other in a row, is too fresh. Tree 𝑖 screen 𝑥𝑖 meters from the entrances and at a height of 𝑦𝑖 meters there is a station that you can use as a start or the end of the rope descent. By fate, all numbers 𝑥𝑖 and 𝑦𝑖 are integers. The management of the park of the new recreation of the exit, which would be the safest, i.e. the carrier is diagnostic The smallest. As we know from geometry, the slope of the rope spanning between station 𝑖 and station 𝑗 will be the quotient of the difference in height and the difference in the distance between the trees, that is, it will be equal to | 𝑦𝑖 - 𝑦𝑗 | | 𝑥𝑖 - 𝑥𝑗 | (obviously doesn't have to be a course). So choose a place to minimize this quotient - write a program that will load the search description, plans the safest rope descent and writes the station numbers to the triggered exit. We are not interested in the situation in which the slope is equal to 0, i.e. between equal heights - it would be impossible to move after the descent Entrance In the first line of local ports, one natural number 000 (1 ≤ 𝑁 ≤ 200,000) is used as trees. In response, local lines contain descriptions of the positions of trees. Description of the tree item number 𝑖 version of two numbers non-negative fish 𝑥𝑖 and 𝑦𝑖 (1 ≤ 𝑥𝑖 , 𝑦𝑖 ≤ 200,000) defining respectively: the distance of the tree from the entrances to w meters and the height in meters at which the designated exit station has been designated. Trees do not need to be listed in ascending order 𝑥𝑖 - they were planted at different times, which gave them numbers in a random order. The values ​​of 𝑥𝑖 are pairwise distinct (no two trees are at the same place). It is guaranteed that there is at least one pair of trees of different heights. Exit In the first (only) line of output, the output is two final numbers 𝑖, 𝑗, (1 ≤ 𝑖, 𝑗 ≤ 𝑁, 𝑖 ≠ 𝑗) denoting the numbers safer rope descent. If there are many correct answers you can unsubscribe any of them. You can also print the numbers 𝑖, 𝑗 in order. Assessment You can task the task in a few simpler variants - some groups of tests optional additional additional possibilities. The table below shows how many points your program will receive if it passes the tests with this restriction.
источник

N

NS in Сообщество Python Программистов
sorry if thats not correct in english but i transalted it
источник

R3

Rud 356 in Сообщество Python Программистов
Бензофуран Гетероцикл
Хранить например id юзера для использования в хендлерах
class User:
 id: int
источник

N

NS in Сообщество Python Программистов
and i need help
источник

N

NS in Сообщество Python Программистов
how to start
источник

N

NS in Сообщество Python Программистов
NS
In the Byteotian Rope Park, an overview of trees, one behind the other in a row, is too fresh. Tree 𝑖 screen 𝑥𝑖 meters from the entrances and at a height of 𝑦𝑖 meters there is a station that you can use as a start or the end of the rope descent. By fate, all numbers 𝑥𝑖 and 𝑦𝑖 are integers. The management of the park of the new recreation of the exit, which would be the safest, i.e. the carrier is diagnostic The smallest. As we know from geometry, the slope of the rope spanning between station 𝑖 and station 𝑗 will be the quotient of the difference in height and the difference in the distance between the trees, that is, it will be equal to | 𝑦𝑖 - 𝑦𝑗 | | 𝑥𝑖 - 𝑥𝑗 | (obviously doesn't have to be a course). So choose a place to minimize this quotient - write a program that will load the search description, plans the safest rope descent and writes the station numbers to the triggered exit. We are not interested in the situation in which the slope is equal to 0, i.e. between equal heights - it would be impossible to move after the descent Entrance In the first line of local ports, one natural number 000 (1 ≤ 𝑁 ≤ 200,000) is used as trees. In response, local lines contain descriptions of the positions of trees. Description of the tree item number 𝑖 version of two numbers non-negative fish 𝑥𝑖 and 𝑦𝑖 (1 ≤ 𝑥𝑖 , 𝑦𝑖 ≤ 200,000) defining respectively: the distance of the tree from the entrances to w meters and the height in meters at which the designated exit station has been designated. Trees do not need to be listed in ascending order 𝑥𝑖 - they were planted at different times, which gave them numbers in a random order. The values ​​of 𝑥𝑖 are pairwise distinct (no two trees are at the same place). It is guaranteed that there is at least one pair of trees of different heights. Exit In the first (only) line of output, the output is two final numbers 𝑖, 𝑗, (1 ≤ 𝑖, 𝑗 ≤ 𝑁, 𝑖 ≠ 𝑗) denoting the numbers safer rope descent. If there are many correct answers you can unsubscribe any of them. You can also print the numbers 𝑖, 𝑗 in order. Assessment You can task the task in a few simpler variants - some groups of tests optional additional additional possibilities. The table below shows how many points your program will receive if it passes the tests with this restriction.
can sonmone help[?
источник

КБ

Кирилл Баст... in Сообщество Python Программистов
NS
can sonmone help[?
Don't flood!!
источник

👑️

👑OGURCHIK🖤 ️ in Сообщество Python Программистов
Rud 356
Предпочту сделать отдельный класс для такого с более жесткой схеммой
+
источник

K

KarmaBot in Сообщество Python Программистов
Вы увеличили карму Rud 356 до 1870.11 (+11.58)
источник

N

NS in Сообщество Python Программистов
?
источник

БГ

Бензофуран Гетероцик... in Сообщество Python Программистов
Rud 356
class User:
 id: int
Ага, окей
И как его увидит хендлер?
источник

КБ

Кирилл Баст... in Сообщество Python Программистов
NS
how to start
Write code, that's start
источник

R3

Rud 356 in Сообщество Python Программистов
Бензофуран Гетероцикл
Ага, окей
И как его увидит хендлер?
Где увидит? Чо увидит? Чо за блять абстрактный хендлер? Так много вопросов, и так мало ответов
источник

N

NS in Сообщество Python Программистов
Кирилл Баст
Write code, that's start
but how
источник

БГ

Бензофуран Гетероцик... in Сообщество Python Программистов
Rud 356
Где увидит? Чо увидит? Чо за блять абстрактный хендлер? Так много вопросов, и так мало ответов
Как ты это в хендлере поймаешь
источник

N

NS in Сообщество Python Программистов
im doing this first time
источник

N

NS in Сообщество Python Программистов
and i need help
источник

БГ

Бензофуран Гетероцик... in Сообщество Python Программистов
Откуда он узнает юзерид
источник

N

NS in Сообщество Python Программистов
it can be in c++ or in python
источник