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

Резултати

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

Търсене: #xrocket

当前筛选 #xrocket清除筛选
TONlines – News

@tonlines · Post #6796 · 16.04.2025 г., 12:07

⚡️xRocket News: EVAA DeFi Quest Claim Phase Begins #xRocket#TON The xRocket News announces the official start of the Claim phase for the EVAA DeFi Quest on April 16, lasting until April 24. Over 30,000 participants were involved, with anti-fraud measures successfully eliminating dishonest play, ensuring fair reward distribution. Source: link @tonlines

Hashtags

TONlines – News

@tonlines · Post #7238 · 16.05.2025 г., 12:09

⚡️xRocket News: Staking Contest Success and Future Campaigns #xRocket#Telegram The recent staking contest on swap.coffee saw participants collect over 5,000 lottery tickets by staking more than 2,500,000 $XROCK, showing strong trust in xRocket's growth. While prizes have already been distributed, xRocket News announces a new campaign arriving next week, encouraging the community to achieve new trading milestones. Source: link @tonlines

TONlines – News

@tonlines · Post #7192 · 13.05.2025 г., 12:09

xRocket News: Exciting Contests and Prizes in May #xRocket#crypto xRocket News reports on the exciting contests rolled out in early May, despite the chilly weather. The channel announced winners for several events, including a lottery and a P2P traders contest, with impressive prize pools. Enthusiasts can still participate in an ongoing raffle by staking $XROCK. Source: link @tonlines

TONlines – News

@tonlines · Post #6732 · 12.04.2025 г., 10:04

xRocket News: Celebrate Cosmonautics Day with Stellar Prizes #xRocket#Web3 xRocket News is celebrating Cosmonautics Day with a special giveaway. Participants can win cosmic-themed prizes by purchasing and holding $XROCK tokens. Winners will be announced on April 18, with prize distribution on April 21. Source: link @tonlines

TONlines – News

@tonlines · Post #6834 · 18.04.2025 г., 12:03

xRocket News Highlights Staking Benefits on Swap.coffee #staking#xRocket xRocket News shares details about the staking opportunities for $XROCK tokens on swap.coffee. With a distribution of 333,333 tokens monthly and an APR of approximately 22.63%, users can benefit from staking. The initiative aims to support the xRocket ecosystem and offers increased returns for longer staking durations. Source: link @tonlines

⚠️Beware of scammers! Since the very morning, spam transactions appeared in the @xRocket bot with a message about the pre-sale of the $XROCK token. The official channel xRocket News✔️announced a reminder: We want to remind you that we held no presales or any sales at the moment, especially outside the bot. Don't send your funds to any wallets in order to buy $XROCK. All trades will be in pair XROCK-USDT at 11-00 UTC. There is no other place where you can buy $XROCK Attention! The #SCAM message comes specifically from the #xRocket bot and looks like a native message from the project, but it is just a comment on the transaction for 0.002 USDT

TONlines – News

@tonlines · Post #7315 · 21.05.2025 г., 17:12

Trading Competition: Baby Doge Coin on xRocket #xRocket#BabyDoge xRocket News announces the listing of Baby Doge Coin on xRocket with a trading competition. Participants trading the $1MBABYDOGE/$TON pair can win a share of the $5,000 prize pool, with the competition running from May 21 to May 28. Baby Doge Coin, a popular meme token on Binance Smart Chain, is now integrated with xRocket’s SocialFi tools. Source: link @tonlines

TONlines – News

@tonlines · Post #7692 · 03.12.2025 г., 12:11

xRocket News: xJourney Launches Wheel of Fortune #xRocket#xJourney xRocket News announces the launch of xJourney’s Wheel of Fortune, a new feature that allows community members to use xPoints for valuable prizes including tickets for mega-prize giveaways. The event will start once 500,000,000 xPoints are burned, with prizes such as a PlayStation 5 and $XROCK available. Source: link @tonlines

TONlines – News

@tonlines · Post #7562 · 21.11.2025 г., 12:14

⚡️xRocket News: Exciting Updates for xJourney #xRocket#xJourney xRocket News announces major updates in the xRocket ecosystem with xJourney now offering daily $XROCK payouts. The top 3 users on the leaderboard earn significant bonuses while others have opportunities through a daily raffle. Daily leaderboard resets ensure continuous engagement and reward distribution. Source: link @tonlines

TONlines – News

@tonlines · Post #7039 · 04.05.2025 г., 09:01

⚡️xRocket News: Epic Star Wars Giveaway Details! #xRocket#StarWars xRocket News presents an exciting Star Wars-themed giveaway with over 20 prizes worth more than 1,000 USDT for fans. Participants can earn tickets by purchasing and holding 500 $XROCK, with winners announced on May 14. All prize details are available on @rocketman's profile. Source: link @tonlines

✉ xQuest — What's Next? 💬The Earn phase in xQuest Launch has officially ended. Over 125,000 users completed various quest tasks: from learning basic xRocket features to mastering trading and staking. This impressive result demonstrates high interest in the new platform. ⏺➕Now the Calculationphase is going, during which the campaign results will be summarize. 💰 After calculations, the Сlaim phase will begin – from March 3rd to March 10th, participants of the first xQuest campaign can claim their earned rewards and share the prize pool of 300,000 $XROCK (~$7750). Trade on xRocket exchange #xQuest#xRocket

🚀$XROCK is now on CoinMarketCap and CoinGecko $XROCK token appeared on CoinMarketCapandCoinGecko, the largest crypto platforms. This means that you can now track all project information on independent sites in a convenient format. CoinMarketCap is the world's most popular cryptocurrency price tracking website, with over 350 million monthly visitors ! CoinGecko is one of the largest aggregators of information related to cryptocurrencies, tokens, crypto exchanges, NFTs, DeFi, which offers more than 11 thousand coins ⭐ Placing on these platforms will allow you to attract the attention of even more users and conquer new blockchain peaks! #TON#xRocket#token

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