aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-09-18 02:08:18 +0900
committernsfisis <nsfisis@gmail.com>2024-09-18 03:08:03 +0900
commitbb75ec16b1400a865b9fb6c2bc4c45db3ef3f550 (patch)
tree9aac18b8cefd8d10b03a81ba2e496fbe4d1e94b4
parenta1c757a9078d1792e5e88269175a4c85c7a5471f (diff)
downloadmncore-challenge-bb75ec16b1400a865b9fb6c2bc4c45db3ef3f550.tar.gz
mncore-challenge-bb75ec16b1400a865b9fb6c2bc4c45db3ef3f550.tar.zst
mncore-challenge-bb75ec16b1400a865b9fb6c2bc4c45db3ef3f550.zip
14-Matrix-Square
-rw-r--r--NOTE.md42
-rw-r--r--problems/14-Matrix-Square/03.vsm10
2 files changed, 29 insertions, 23 deletions
diff --git a/NOTE.md b/NOTE.md
index 7ffb9fd..2e7dc2e 100644
--- a/NOTE.md
+++ b/NOTE.md
@@ -1,28 +1,23 @@
# 得点効率表
-```
-m = min{上位5名の点}
-M = 自分の点
-```
-
-| 問題 | m | M | m-M |
-|-----------------|-----|-----|-----|
-| Mul 7 | 88 | 70 | 18 |
-| Abs | 100 | 80 | 20 |
-| FAM 8 | 85 | 85 | 0 |
-| FMul 2 | 100 | 100 | 0 |
-| Lesseq | 100 | 100 | 0 |
-| Transpose | 85 | 67 | 18 |
-| Gather | 100 | 100 | 0 |
-| Square Sum | 100 | 100 | 0 |
-| Convert Endian | 100 | 100 | 0 |
-| Mod 3 | 85 | 48 | 37 |
-| Matrix Square | 100 | 92 | 8 |
-| Contains | 82 | 17 | 65 |
-| Count Up | 81 | 33 | 48 |
-| Transpose MAB | 57 | 49 | 8 |
-| Inversion Small | 67 | 27 | 40 |
-| Inversion | 81 | 19 | 62 |
+| 問題 | 自得点 | 差 |
+|-----------------|--------|----|
+| Mul 7 | 70 | 30 |
+| Abs | 80 | 20 |
+| FAM 8 | 85 | 15 |
+| FMul 2 | 100 | 0 |
+| Lesseq | 100 | 0 |
+| Transpose | 67 | 33 |
+| Gather | 100 | 0 |
+| Square Sum | 100 | 0 |
+| Convert Endian | 100 | 0 |
+| Mod 3 | 48 | 52 |
+| Matrix Square | 100 | 0 |
+| Contains | 19 | 81 |
+| Count Up | 33 | 67 |
+| Transpose MAB | 47 | 53 |
+| Inversion Small | 27 | 73 |
+| Inversion | 19 | 81 |
# 短縮テクニックメモ
@@ -39,3 +34,4 @@ M = 自分の点
* 2倍は `packbit`
* 入力と出力のスループットは絶対
* MAB/PE 等の出し分けに `$t` を使わずマスクを使う
+* 2長語のフォワーディングの MSB 側だけを使う
diff --git a/problems/14-Matrix-Square/03.vsm b/problems/14-Matrix-Square/03.vsm
new file mode 100644
index 0000000..17bcd35
--- /dev/null
+++ b/problems/14-Matrix-Square/03.vsm
@@ -0,0 +1,10 @@
+hmwrite $llm0vr $ly0; hbfn/9 $llm0vr $lr0v
+hmwrite $llm16vr $ly4; hbfn/9 $llm16vr $lr8v
+hmwrite $llm32vr $ly8; hbfn/9 $llm32vr $lr16v
+hmwrite $llm48vr $ly12; hbfn/9 $llm48vr $lr24v
+hmread $lly0 $nowrite; hmwrite $llr0v $llx0
+hmread $lly8 $nowrite; hbfn/9 $mreadf $lls0v; hmwrite $llr16v $llx8
+hmmul $lx $aluf $lln0v8; hbfn/9 $mreadf $llr0v
+hmmul $lx $aluf $lln32v8
+hmmul $lx $ls2v4 $lln4v8
+hmmul $lx $lr2v4 $lln36v8