05 2020 档案
摘要:饮水思源:线性代数的本质 - 点积与对偶性 概念 向量间的一种运算。 用途 通过这种运算可以检验两个向量的指向是否相同(计算结果为正则相同,负则不同)。 内积与顺序无关 用对称性解释。就是先假设两向量是等长的(关于某条直线对称),那么就无所谓谁投影都谁上面。然后去改变其中一个向量大小的比例,发现其改
阅读全文
摘要:题 例题6-2 铁轨(Rails,UVa 514),题目见参考。 #include <cstdio> #include <vector> #include <stack> using namespace std; int main() { int n, x; vector<int> pop_orde
阅读全文
摘要:例子 使用C语言的字符串库,更多请看参考1 #include <cstdio> #include <cstring> int main() { // NOTICE 在处理字符串时,如果越界,通常在编译时并不报错。 // 但是运行时会有未定义的行为。 // 因此要确保字符数组长度大于其存储的字符串长度
阅读全文
摘要:例子 1、scanf VS. getchar #include <cstdio> #include <cstring> int main() { char s[20]; while (scanf("%s", s) == 1) { printf("echo: %s\n", s); } // 但是 sc
阅读全文
摘要:题 习题5-4 复合词(Compound Words,UVa 10391)。完整题目见参考[1] #include <iostream> #include <cstring> #include <string> #include <set> using namespace std; set<stri
阅读全文