https://t.iss.one/c/1119363280/109316 #reveng ndk onCreate
https://t.iss.one/c/1119363280/109356 #huawei homoOs( #旧事重提
https://t.iss.one/c/1119363280/109367 xposed #wechat
https://t.iss.one/c/1119363280/109378 #china #robotic #旧事重提 光年实验室
https://t.iss.one/c/1119363280/109402 #framework
https://t.iss.one/c/1119363280/109498 #i18n #china #haha 祖安汉化
https://t.iss.one/c/1119363280/109540 #app #coolapk #wechat
https://t.iss.one/c/1119363280/109578 #web https://ai DNS 有意思
https://t.iss.one/c/1119363280/109703 #huawei #旧事重提 HomoDroid 笑死
https://t.iss.one/c/1119363280/109845 #android #sysadmin
https://t.iss.one/c/1119363280/109918 #telegram #acg #tools @WhatAnimeBot
https://t.iss.one/c/1119363280/109946 草 #cplusplus #build #packaging
https://t.iss.one/c/1119363280/109958 #app #security 老kit 了
https://t.iss.one/c/1119363280/110001 Gitee routing OAuth? #security #http
https://t.iss.one/c/1119363280/110210 #android 模拟器 SafetyNet. 甚至私聊攻击 Rikka 生气了 #sb https://t.iss.one/c/1119363280/110347
https://t.iss.one/c/1119363280/110452 PackageManager
https://t.iss.one/c/1119363280/110473 #recommended #android #backend #gui #blog gityuan.com
https://t.iss.one/c/1119363280/110634 #huawei #google #low
https://t.iss.one/c/1119363280/110662 #plt #typing #java
https://t.iss.one/c/1119363280/110677 #json #algorithm LinkedHashMap
https://t.iss.one/c/1119363280/110743 #qt
https://t.iss.one/c/1119363280/109356 #huawei homoOs( #旧事重提
https://t.iss.one/c/1119363280/109367 xposed #wechat
https://t.iss.one/c/1119363280/109378 #china #robotic #旧事重提 光年实验室
https://t.iss.one/c/1119363280/109402 #framework
https://t.iss.one/c/1119363280/109498 #i18n #china #haha 祖安汉化
https://t.iss.one/c/1119363280/109540 #app #coolapk #wechat
https://t.iss.one/c/1119363280/109578 #web https://ai DNS 有意思
https://t.iss.one/c/1119363280/109703 #huawei #旧事重提 HomoDroid 笑死
https://t.iss.one/c/1119363280/109845 #android #sysadmin
https://t.iss.one/c/1119363280/109918 #telegram #acg #tools @WhatAnimeBot
https://t.iss.one/c/1119363280/109946 草 #cplusplus #build #packaging
https://t.iss.one/c/1119363280/109958 #app #security 老kit 了
https://t.iss.one/c/1119363280/110001 Gitee routing OAuth? #security #http
https://t.iss.one/c/1119363280/110210 #android 模拟器 SafetyNet. 甚至私聊攻击 Rikka 生气了 #sb https://t.iss.one/c/1119363280/110347
https://t.iss.one/c/1119363280/110452 PackageManager
https://t.iss.one/c/1119363280/110473 #recommended #android #backend #gui #blog gityuan.com
https://t.iss.one/c/1119363280/110634 #huawei #google #low
https://t.iss.one/c/1119363280/110662 #plt #typing #java
https://t.iss.one/c/1119363280/110677 #json #algorithm LinkedHashMap
https://t.iss.one/c/1119363280/110743 #qt
duangsues.is_a? SaltedFish
绿色的都比黄色小 红色都比黄色大 只要判断 黄色和你的数据的关系 就能排除掉 上面或者下面那一块
duangsuse:
二分查找还是分治嘛,对了它是几个指针来着 真的能斜切线吗
大 佬: #algorithm #Java #code
二分查找还是分治嘛,对了它是几个指针来着 真的能斜切线吗
大 佬: #algorithm #Java #code
class Solution {
public boolean searchMatrix(int[][] matrix, int target) {
int lenSize = matrix.length;
int rowSize = matrix[0].length;
return search(matrix, 0, lenSize, 0, rowSize, target);
}
private boolean search(int[][] matrix, int a1, int b1, int a2, int b2, int target){
if(a1 == b1 || a2 == b2){
return false;
} else {
int mid1 = (a1 + b1) / 2;
int mid2 = (a2 + b2) / 2;
if(matrix[mid1][mid2] == target){
return true;
} else if(target > matrix[mid1][mid2]){
return search(matrix, a1, mid1 + 1, mid2 + 1, b2, target) || search(matrix, mid1 + 1, b1, a2, b2, target);
} else {
return search(matrix, mid1, b1, a2, mid2, target) || search(matrix, a1, mid1, a2, b2, target);
}
}
}
}#math #algorithm #code
x + y = 35, 2x + 4y = 94用高斯消元法,先将第一个方程乘以 -2,然后加到第二个方程上,得到:
-2x - 2y = -70, y = 12所以,鸡有 23 只,兔子有 12 只。
x + 12 = 35
# 对 x + y = 35, 2x + 4y = 94 的系数组,进行高斯消元#kt
def elim(arg):
n,m = arg.shape
for j in range(n):
# 找到第 j 列最强元素的行
i= max(range(j, n), key=lambda i: abs(arg[i, j]))
assert arg[i, j] != 0, '矩阵是奇异的'
# 本列成为最强
if i != j: arg[[i,j]] = arg[[j,i]]
# 归一本行(除以 j 行的元素)
arg[j] /= arg[j, j]
# 将其他行的第 j 列的元素消为 0
for i in range(n):
if i != j: arg[i] -= arg[i, j] * arg[j]
# 成功消元
return arg
// 定义一个函数,用于对二维数组进行高斯消元
fun gaussElimination(matrix: Array<Array<Double>>): Array<Array<Double>> {
val n = matrix.size // 矩阵的行数
val m = matrix[0].size // 矩阵的列数
// 遍历每一行
for (i in 0 until n) {
// 找到第 i 列中绝对值最大的元素所在的行
var maxRow = i
var maxVal = matrix[i][i]
for (j in i + 1 until n) {
if (abs(matrix[j][i]) > abs(maxVal)) {
maxRow = j
maxVal = matrix[j][i]
}
}
// 如果最大值为零,说明矩阵是奇异的,无法消元,抛出异常
if (maxVal == 0.0) {
throw Exception("Singular matrix")
}
// 如果最大值不在第 i 行,交换两行的位置
if (maxRow != i) {
val temp = matrix[i]
matrix[i] = matrix[maxRow]
matrix[maxRow] = temp
}
// 将第 i 行除以第 i 列的元素,使其变为 1
val pivot = matrix[i][i]
for (k in i until m) {
matrix[i][k] /= pivot
}
// 将其他行的第 i 列的元素消为 0
for (j in 0 until n) {
if (j != i) {
val factor = matrix[j][i]
for (k in i until m) {
matrix[j][k] -= factor * matrix[i][k]
}
}
}
}
// 返回消元后的矩阵
return matrix
}
// 定义一个函数,用于打印二维数组
fun printMatrix(matrix: Array<Array<Double>>) {
for (row in matrix) {
println(row.joinToString(" "))
}
}
// 定义一个测试用例,鸡兔同笼问题的系数矩阵
val testMatrix = arrayOf(
arrayOf(1.0, 1.0, 35.0),
arrayOf(2.0, 4.0, 94.0)
)
// 调用高斯消元函数,并打印结果
val resultMatrix = gaussElimination(testMatrix)
printMatrix(resultMatrix)#learn #algorithm
basenc(K, radix="ABC..+/") 的每字符吃掉 b:bytes 里 nc=log2(K)位
nc=4,5,6 的膨胀率(B/A)是 2/1, 8/5, 4/3. 对于z85(nc非整数) pad=禁用
- reGrp(A, join,enc, zpad)(b) 对b+zpad 分组转码,最后去掉nPad 补上'='
- reBit(8,nc, b,K-1) 把8bit 转为nc bit 的流. (nc,8, b,0xFF)反之
- enc 转码 radix[流], "SGVs"->流
nPad(n待补)=b32? (解码? n*5/8+1 : n*8/5>>0) : n
zpad=radix[-1] ,z85 使用 s=radix[a%K]+s,a/=K 而非 a>>nc 拆字节
a85 自动处理 '<~~>', 4字块 z=0, y=0x20202020
b32 的临时整数会超过32bit