TGTGInsightтелеграм анализLIVE / telegram public index
← Такты, стеки, два колеса

TGINSIGHT SIMILAR POSTS

Намери подобно съдържание

Изходен канал @clockstackwheels · Post #1084 · 9.04

В общем, была задача на оптимизацию плана работ: есть набор заказов, и в каждом N тасков. Таски могут зависеть друг от друга или нет, имеют длительность и тип. Ещё есть M работников, каждый из которых может выполнять таски только определённых типов, причём, у каждого своя скорость. Если все таски в заказе выполнены, фирма получает сколько-то денег. У заказа есть дедлайн, за просрочку штраф (за каждый день просрочки), который вычитается из цены заказа. И ещё фирма тратит деньги за каждый день своей работы независимо от того, как загружены её сотрудники (то есть просто платит зарплаты по сути). Ещё важен учёт праздников и выходных. Нужно заработать на определённом наборе заказов и работников как можно больше денег. Полный текст задачи и код программы проверки есть в репозитории. Эта задача является изменённым заказом, который мы с напарником решали в реальной жизни: оптимизация работы печатных станков для типографии. Правда, тогда и мы справились так себе, и заказчик в итоге сначала захотел всё вручную сам делать, а потом и вовсе похоронил проект при смене директора. !!! Не читайте дальше, если хотите сначала попробовать решить самостоятельно, потому что я сейчас опишу эффективные подходы и результаты. ________________________________________ Так вот. Мы с другим экспертом Андреем сразу сели и написали разные варианты, чтобы задать шкалу, по которой будем оценивать решения команд. За пару часов я собрал примитивный жадный алгоритм, который сортировал заказы по прибыльности и укладывал в сетку кое-как, это дало нам нижнюю оценку. Мой алгоритм заработал ~75 млн виртуальных рублей, мы решили для оценки поставить нижней границей 40 млн. То есть всё, что ещё ниже, оценивалось в ноль баллов за качество оптимизации. Затем Андрей закрылся дома на три дня и вышел на свет со сложным жадным алгоритмом, который очень хитро сортировал заказы и очень хитро укладывал их в сетку, попутно выбирая разные способы этой укладки в зависимости от конкретного заказа. Это позволило заработать ~275 млн рублей. Мы сделали верхней границей для оценки 280 млн. К сожалению, в итоге только две команды из десяти прошли нижнюю границу, заработав, соответственно, ~91 и ~105 млн. К верхней границе не приблизился никто. И у четырёх команд алгоритм вообще не смог уложить без нарушений задачи в сетку (то есть, например, произвольно менял длительности, накладывал задачи друг на друга, давал одному работнику две задачи в один момент и так далее). Важной ошибкой команд, на мой взгляд, являлся тот факт, что никто не воспользовался возможностью запустить алгоритм на несколько минут и дать ему поработать. По условиям задания, можно было тянуть до 5 минут на одну оптимизацию, но по факту решения команд отрабатывали за единицы и десятки секунд. На самом конкурсе, пока команды работали, я решил попробовать сделать быстрое (по времени написания) но эффективное решение. Сначала попробовал жадную сортировку + доведение до лучшего варианта методом имитации отжига. В качестве нового состояния я просто менял местами заказы целиком. Этот вариант работал пару минут и дал мне около ~200 млн дохода. К слову, команда-лидер использовала такой же подход, просто не докрутила число итераций и температуру. Ну и потом я взял готовую либу по реализации классической генетики с особями и скрещиванием. Особью был массив с приоритетами заказов (которые конечно же нужно было аккуратно уложить чистым алгоритмом). Тип скрещивания: scattered. Всего 15 поколений по 20 особей, и это за минуту-полторы давало ~230-240 млн. Считаю, что для конкурса это самый лучший выбор: пишется одним человеком за день и даёт почти максимум, при этом легко настраивается на нужную длительность работы, легко параллелится. Ну а потом уже дома я посидел и накодил свой вариант сложного жадного с плавающим окном перебора отсортированных заказов и плавающей же укладкой по работникам. Такая штука за две минуты зарабатывает ~281 млн. Но за три дня в условиях стресса я бы такое не сделал, скорее всего. #dev

Hashtags

Резултати

Намерени 14 подобни публикации

Търсене: #russianculturalcode

当前筛选 #russianculturalcode清除筛选
Learn RCRussian🤍💙❤️

@learnRCRussian · Post #6030 · 13.01.2026 г., 13:00

Mike Tyson — about those who should not be messed with. 🥊The journalists asked Mike Tyson, a boxing legend, a man who knows what a real fight is, for his opinion on a "hot" geopolitical issue. His response was typically Tysonian—without diplomacy, on the edge, but impossibly honest: "Do you want to fight the Russians? Good luck in hell! Seriously? Have you ever seen these people? They've been through things that we can't even imagine. Stalingrad. Chechnya. Winters when they survive at -40. These are not people who can be scared. I've been there, I've seen Russians. They are ready to do anything for their land. What are you ready for? Don't make me laugh." 🥊This is not politics. This is a view from a world where the price of victory and defeat is measured not in ratings, but in blood and fortitude. When Iron Mike speaks, who knows everything about confrontation, it's worth listening. Video: Ri00 #brief_and_interesting #RussianCulturalCode 🟠RCR | Support | Boost

Learn RCRussian🤍💙❤️

@learnRCRussian · Post #5531 · 08.10.2025 г., 13:00

Well done, professional drifters cry... 🔻The wife is a professional driver with nerves of steel, every man's dream. 🔻Am I the only one who has the feeling that she deliberately took an advantageous position with the help of drift, and then she will fire a couple of AK47 shots at a white SUV?) 🔻The husband of the Russian Mrs. Smith did not guess who she was for a long time... ⚠️Do not attempt! Dangerous! Performed by a professional Russian woman!) Video: АВТОДОК Song&music: Pink Panter #Russian_culture #RussianCulturalCode 😎RCR | Support | Boost

Learn RCRussian🤍💙❤️

@learnRCRussian · Post #5512 · 03.10.2025 г., 16:00

A quiet winter evening in Russia 🔻A young guy returns home after work, the winter sun is setting. It turned out to be a good day with no incidents, no unexpectedly falling meteorites, no mutant bears, no tank columns suddenly crossing the road. 🔻Silence, the engine sounds soothing, he is discussing something with a friend on the phone. There is slow traffic on the winter road, polite and careful drivers... 🔻Nothing can distract a Russian driver from talking to a friend... ❤️May your Friday be just as serene! Video: РОБОТ #Russian_culture #RussianCulturalCode 😎RCR | Support | Boost

Learn RCRussian🤍💙❤️

@learnRCRussian · Post #5511 · 03.10.2025 г., 13:00

Еven fear itself was afraid of this girl… 🔻Well, back in the 19th century, the Russian poet Nekrasov in his poem Мороз, красный нос (Frost, Red Nose) (1863) wrote about Russian women: • Коня на скаку остановит, в горящую избу войдёт... She will stop a galloping horse and enter a burning hut… ⚠️Do not attempt! Dangerous! Performed by a professional Russian woman!) Video: Женское счастье 🎵: Женя Любич #Russian_culture #RussianCulturalCode 😎RCR | Support | Boost

Learn RCRussian🤍💙❤️

@learnrcrussian · Post #4366 · 18.03.2025 г., 11:49

Russians don't smile without reason 🔻83% of Russians, according to the All-Russia Public Opinion Research Center (VCIOM), consider themselves happy. However, there haven't been more smiles on the streets, and foreigners continue to perceive us as a gloomy and unfriendly nation. But we perfectly remember the proverb: Смех без причины - признак дурачины. (Laughter without reason is a sign of a fool). 🔻For a European person smiling upon meeting someone is a demonstration of politeness and goodwill towards the interlocutor. For Russians, however, "дежурная улыбка" ("a perfunctory smile") is not a desirable quality and is rather alarming. Russians rarely smile at strangers and are not always ready to reciprocate a smile. 🔻The uniqueness of the Russian smile lies in the fact that it must be sincere, have a valid reason understandable to those around, and be appropriate. Smiling for no reason is not accepted. 🔻Russians have their own smile, which in its mysteriousness is not inferior to the Mona Lisa's smile. Not strained, sincere, from the depths of our soul! #RussianCulturalCode #Russian_culture 😎 Stay with @learnRCRussian

Learn RCRussian🤍💙❤️

@learnRCRussian · Post #6144 · 04.02.2026 г., 13:00

-73 degrees Celsius (С)? Not the limit for the Russian Vityaz! ❄️As Fyodor Biganov, an engineer-tester at the MK-Vityaz enterprise (part of Rostec's UVZ concern), recalls, during a winter expedition in Antarctica, the "outboard" temperature dropped to -73 degrees C: The equipment held up. They added diesel fuel to the lubricant to prevent it from thickening too much in extreme cold. The main danger was that the rubber bands on the tracks would crack like glass. We had to warm up for a long time and move very carefully. We managed to deliver the cargo and return safely. ❄️The Vityaz two-link tractors were designed for such extreme conditions. They can navigate through swampy, snowy, and even sea environments. These all-terrain vehicles can withstand waves up to three points. They can even be used to unload ships. Вездеход ДТ "Витязь" Video: УралВагонЗавод #Kulibin_and_the_Red_Army#RussianCulturalCode 🟠RCR | Support | Boost

Learn RCRussian🤍💙❤️

@learnRCRussian · Post #5947 · 01.01.2026 г., 11:00

31 декабря: Не трогай, это на Новый год! December 31st: Don't touch that, it's for New Year! 1 января: Ешь, а то испортится! January 1st: Eat it, or it'll go bad!  #memes #holidays #RussianCulturalCode 🟠RCR | Support | Boost

Learn RCRussian🤍💙❤️

@learnrcrussian · Post #4368 · 18.03.2025 г., 15:00

When it comes to adaptation of favourite food to Russian reality: 🍕Dumpling Pizza (found in a Moscow restaurant: ☆ Mini beef and pork dumplings ☆ Mozzarella cheese ☆ Red onion ☆ Ketchup+mayonnaise sauce ☆ Dill 😉Would you dare to try it? #Russian_cuisine #RussianCulturalCode 😎 Stay with @learnRCRussian

Learn RCRussian🤍💙❤️

@learnrcrussian · Post #6433 · 18.04.2026 г., 18:22

A cat exhibition is being held in Moscow - featuring dozens of artworks dedicated to fluffy friends. 🐱🐾 Until May 10th, you can see the works of 20 artists who have presented cats as part of our cultural code. • Выставка (выставки) (femin.noun) [vys-taf-ka (vys-taf-ki)] An exhibition(s) Source: JDMax #RussianCulturalCode #news #Caturday #useful_vocabulary 🟠RCR | Support | Boost

Learn RCRussian🤍💙❤️

@learnrcrussian · Post #4862 · 19.06.2025 г., 09:00

🔢🔢🔢 Possible answers to Как дела?: • Как (твои/ваши) дела? [kak (tva-i/va-shi) di-la] How are you? 1. Отлично! [at-lich-na] Exсellent! 2. (Очень) хорошо [(o-chin' kha-ra-sho] (Very) good/well 3. Нормaльно (= slang Норм) [nar-mal'-na (norm)] Аlright, OK, decent 4. Ничего [ni-chi-vo] SLT: nothing It's OK, nothing much 5. Неплохо [ni-plo-kha] Not bad 6. Так себе [tak si-be] Not very good, could be better 7. Плохо [plo-kha] Bad, not good 8. Хуже некуда. [khu-zhe ne-ku-da] Couldn't be worse, terrible 😉Be sure Russians WILL TELL you why they are (not) good/well today, because this question isn't just a sign of politeness in Russia. Just be ready to listen or run! ▶️Other ways to ask Как дела? 🎧🗣👇 А как ваши дела сегодня? #365_marathon #survive_in_Russia #RussianCulturalCode #spoken_Russian 😎RCR | Support | Boost

Learn RCRussian🤍💙❤️

@learnrcrussian · Post #4354 · 15.03.2025 г., 16:00

Olympic figure skating champion Alina Zagitova performed an ice dance on Lake Baikal with her partner. "Lake Baikal ice, -30 degrees. What are you ready to do for your dream project?" she wrote. 🔻Alina hasn't revealed the details yet. According to the figure skater, the project took about six months to complete. It was one of the most challenging shoots of her life, but the result is amazing! 😉Russian cultural code is like... Video: IRK.ru #news #Russianbeauties #Russiannature #RussianCulturalCode 😎 Stay with @learnRCRussian

12
ПредишнаСтр. 1 от 2Следваща