随笔分类 - 算法笔记
摘要:Hash(散列函数) Hash,一般翻译做“散列”,也有直接音译为“哈希”的,就是把任意长度的输入(又叫做预映射pre-image)通过散列算法变换成固定长度的输出,该输出就是散列值。这种转换是一种压缩映射,也就是,散列值的空间通常远小于输入的空间,不同的输入可能会散列成相同的输出,所以不可能从散列
阅读全文
摘要:#include <stdio.h> #include <cmath> #include <cstring> #include <cstdio> #include <iostream> #include <algorithm> using namespace std; int a[11]; int
阅读全文
摘要:链接 :http://codeforces.com/contest/520/problem/B code forces two buttens代码 ********************* #include <stdio.h>int main(){ int s,g,r=0; scanf("%d%d
阅读全文
摘要:#include <cmath>#include <iostream>using namespace std;int main(){ int x = 2; int y = 3; cout << "2*2*2 = " << pow(x,y) << endl; return 0;}
阅读全文
摘要://第一种写法 #include <stdio.h> int main(){ int a[100], T, n = 0; char ch; for(scanf("%d ", &T); T; T--){ n = 0; char ch; while((ch = getchar()) != '\n'){
阅读全文
摘要:#include <iostream> #include <algorithm> using namespace std; int main(){ int a[3]={1, 2, 3}; do{ for (int i = 0; i < 3; i++) cout<<a[i]; cout<<endl;
阅读全文
浙公网安备 33010602011771号