初音ミクの消失

wakarimasu

字数统计: 430阅读时长: 2 min
2019/02/15 Share

wakarimasu

本质是解两个矩阵,一个是乘法矩阵求逆,另外一个仅仅是矩阵的加减

由于矩阵求逆的时候存在小数精度问题,故用计算机算出来的值不会精确到整数,但是一旦你看到那个结果就一定会知道你算对了

算矩阵的网站:
https://zh.numberempire.com/matrixcalculator.php

https://zh.numberempire.com/matrixbinarycalculator.php

A =

8 1 7 1 1 0
4 8 1 2 3 9
3 8 6 6 4 8
3 5 7 8 8 7
0 9 0 2 3 4
2 3 2 5 4 0

B =

122 207 140 149 142 168
95 201 122 145 136 167
112 192 127 137 134 147
95 207 110 134 133 173
136 212 160 162 152 179
121 193 126 126 119 147

c =

16 8 8 14 6 11
5 23 5 10 12 23
14 23 19 7 8 10
4 13 22 17 11 22
6 14 2 11 18 9
5 8 8 10 16 13

X1 * B = A

X2 + B = C

X1=AB^-1

=

5.999951 5.999888 6.000136 5.999828 5.999879 7.000097
2.999953 4.999902 7.000126 5.999842 5.999886 6.000086
5.999953 4.999893 4.000127 5.99984 6.99989 7.000089
2.999956 6.999908 5.000125 5.999846 6.999877 5.000089
6.999948 5.999879 7.000144 6.999816 4.999875 7.000104
6.999956 5.999896 6.000123 2.999842 5.999887 7.000091

x2 = C - B

=

8 7 1 13 5 11
1 15 4 8 9 14
11 15 13 1 4 2
1 8 15 9 3 15
6 5 2 9 15 5
3 5 6 5 12 13

再将X1与X2结合(X1为高四位,X2为低四位)

#include<cstdio>
int a[]={6,6,6,6,6,7,3,5,7,6,6,6,6,5,4,6,7,7,3,7,5,6,7,5,7,6,7,7,5,7,7,6,6,3,6,7};
int b[]={8,7,1,13,5,11,1,15,4,8,9,14,11,15,13,1,4,2,1,8,15,9,3,15,6,5,2,9,15,5,3,5,6,5,12,13};

int main(){
for(int i = 0; i <= 35; i++)
printf("%c", (a[i]<<4) + b[i]);

}

原文作者:mrh929

原文链接:https://mrh1s.top/posts/6aab0075/

发表日期:February 15th 2019, 4:31:00 pm

更新日期:May 5th 2019, 1:48:56 pm

版权声明:本文采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可

CATALOG