TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

SQLite3 Hash Code 2018

3 点作者 mingodad大约 7 年前

1 comment

mingodad大约 7 年前
Hello !<p>I&#x27;ve been looking ath the HASHCODE 2018 competition and got interested on the problem proposition:<p>Task Given a list of pre-booked rides in a city and a fleet of self-driving vehicles, assign the rides to vehicles, so that riders get to their destinations on time.<p>For every ride that finishes on time (or early), you will earn points proportional to the distance of that ride; plus an additional bonus if the ride also started precisely on time.<p>It took me a while to get something working and at end I saw that I was basically using sqlite3 capabilities to do the data manipulation tasks and only needed a few calculations for the rest.<p>So I tried to see if I also could make those calculations inside sqlite3 and after a while I could get it to work:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;mingodad&#x2F;sqlite3-hashcode-2018&#x2F;blob&#x2F;master&#x2F;hashcode2018.sql" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mingodad&#x2F;sqlite3-hashcode-2018&#x2F;blob&#x2F;maste...</a><p>As I stated there:<p>By no means I claim that solutions like this (stretching sqlite3) are good practice. Take it as an example that demonstrates several capabilities of sqlite3 in a hack&#x2F;compact way.<p>So I&#x27;m showing it here just in case it can help&#x2F;invite other people to find imaginative ways where sqlite3 can be used to solve problems.<p>Cheers !
评论 #16520926 未加载