- windowsキーを押してStoreと打ち込み、Microsoft Storeを開く
- 検索のところに「ubuntu」と打ち込むと、
- ubuntu
- ubuntu 18.04 LTS
- ubuntu 16.04 LTS
- が出てくる。
- 今回はubuntu18.04 LTSで話を進めていきます。
- インストール ボタンを押せばOK。ダウンロードに時間がかかるので少し待ちます。
- Storeの方に起動ボタンが現れるので、それを押す
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://codepen.io/erikwoods/pen/wewPaO | |
// because of the chrome71->72 change, add change | |
// I wrote about this here: https://medium.com/@erikwoods/i-made-a-discovery-svg-and-svg-animations-in-the-js-console-are-doable-6c367c95726a | |
// if you’re new to svg, don’t worry about that biz — just move on to the next line because this one is a really long line | |
var svgbiz = '<svg xmlns="http://www.w3.org/2000/svg" width="320" height="320" fill="none" stroke="#000" stroke-linecap="round" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="b"><animate id="a" attributeName="d" values="m160,160l0,0 0,0;m130,110l30,-17 30,17;m130,60l30,-17 30,17;m160,20l0,0 0,0" dur="6s" repeatCount="indefinite"/><animate attributeName="stroke-width" values="0;4;4;4;0" dur="6s" repeatCount="indefinite" begin="a.begin"/></path><path id="c"><animate attributeName="d" values="m160,160l0,0 0,0;m130,110l30,-17 30,17;m130,60l30,-17 30,17;m160,20l0,0 0,0" dur="6s" repeatCount="indefinite" begin="a.begin+1s"/><animate attributeName="st |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
import re | |
import codecs | |
def head_space(line): | |
return re.match(r' {4}(.*)', line) | |
def head_hyphen(line): | |
return re.match(r'- (\S.*)', line) |
目的: C++を使う競プロで競技中になるべくコマンドラインを触らないようにして楽をするためのMake入門
makeとは
- makeはコンパイル自動化ツールである。(依存関係を含む複雑なコンパイルや、別々の環境用にコンパイル方法を指定したいときに使う)
- makeはUNIX標準ツールとして用意されている。今回はGNU Makeを扱う。
- 困ったときは、 https://www.gnu.org/software/make/manual/ を見ればOK。
- p25 くじ引きHard
-
$$N^2 logN$$ の解法を理解した(未実装) - binary_searchの実装 https://github.com/tMasaaa/ant-book-rust/blob/master/library/binary_search/main.rs
抽象的なので書いてから文献読んでまた書き直したい
広義今日なので
- dpとかで、vig内グローバルに配列を置いてそれを参照することは可能か?→難しい。よく分からない状態で初期化するのは
static mut
になってunsafeへの道。解決策としては、structでpubにしておいて外部からアクセスできるようにする。その状態でstruct初期化を行い、それに応じた関数をself
で呼び出す。もっといいやり方がありそう。 - あと、配列はプリミティブで所有権とかあまり気にしなくてよいので、Vecより配列を積極的に使っていく。(一度にとるときに向いてそう、要素が動的に追加される場合はVecがいいかも)
mod vig {
pub struct A {
広義今日が多いな
- 共通範囲をとればよい。切り上げに注意。
- ライブラリ整備した。二分探索は配列に対し行うことが多いが、
start..end
がでかいと配列をとってしまうとMLEする。素直にlow, highに対し素朴に二分探索を行えばよい。このとき、 closureの参照を渡すとうまく行った。 lowとhighを指定する実装 - クロージャを引数に取るが参考になった。
毎日、朝にこのメモを開くことにしてみる
- dfsの参考になるもの https://atcoder.jp/contests/abc126/submissions/5801152
- たぶん、dfsは内部バリエーションが激しいのでその場に応じて書き直すようになると思う
- field https://github.com/tMasaaa/ant-book-rust/blob/master/c2-1/p7/main.rs#L53-L86
- これまで解いた問題のファイルの内容から、特定の文字列を抜き出す
find . -type f -print | xargs grep ""
昨日は前半良くて後半失速した。今日は失速しないように頑張る
- Cでプログラムを書く必要があるので、優先的にやっておいて悪くないなと思った。
- mallocとCコンパイラ自作して、あとは適当なインタプリタでも作るかと思うけど、無理そう。
- https://gist.github.com/pn11/c973af16d91f92f9874f これを参考にtmuxでcopy pasteできるようにする→無理だった。xselはXServerを必要とするので、Xが起動していないとダメ。prefix+zで拡大、縮小ができるのでそれで選択する。
ssh -T git@github.com
が通った。ヨシ。- 次は3章から。結構がんばったほうだ。やったことは https://github.com/tMasaaa/linux-c-learn にあげてある
OlderNewer