Comments (3)
サンプルコード
package main
import (
"strconv"
"strings"
"github.com/k0kubun/pp"
)
func main() {
res := "105,204 105,202 106,193 114,179 129,162 152,143 175,128 206,116 232,111 250,111 272,111 290,113 304,122 324,145 332,165 343,191 351,217 354,240 355,262 354,281 343,303 322,333 300,354 271,376 252,387 237,394 223,399 216,401 213,402 212,405"
type point struct {
X int
Y int
}
points := make([]point, 0, 100)
for _, s := range strings.Split(res, " ") {
ps := strings.Split(s, ",")
x, _ := strconv.Atoi(ps[0])
y, _ := strconv.Atoi(ps[1])
points = append(points, point{x, y})
}
pp.Println(points)
}
from isucon6-final.
今回のsvg専用のパーサーを切り出して用意した方が良さそう
from isucon6-final.
いただきました。
from isucon6-final.
Related Issues (20)
- ISUCON6 本選当日の集合時間などについて
- azure cdnでポータルサイトをhttpsに HOT 4
- APIのポートを80に統一 HOT 1
- nodejs: [GET /img/0] リクエストがタイムアウトしました
- python: /var/www/app.py:364: Warning: (1265L, u"Data truncated for column 'y' at row 1") Oct 19 17:14:42 isu01 docker-compose[48766]: python_1 | 'y': point['y'] HOT 1
- perl: HOT 4
- kamipo TRADITIONAL HOT 2
- Server-Sent Eventsの仕様ではretryはミリ秒を自然数で指定する HOT 1
- Spark実装 HOT 1
- ベンチマーカー:GoのHTTP2クライアントで最初のバイトがロストするときがあるらしい HOT 4
- Perlのdocker内でcpan installにかなり時間がかかる HOT 5
- 競技者のAzure to Deployボタンを用意する HOT 1
- レギュレーションを用意する HOT 2
- ベンチマーカーの限界を探る
- ansibleデプロイ用のtarballを本番に移動 HOT 3
- リポジトリ公開
- 講評
- 裏話Night日程調整 HOT 3
- リポジトリ公開前にやること HOT 4
- ベンチマーク側を一発デプロイできるようにする HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from isucon6-final.