期末上繳報告啊,不知道要寫多少才對得起自己。理解正確性不敢保證,相當可怕。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <limits.h> | |
#include <vector> | |
using namespace std; | |
class OfflineRMQ { | |
public: | |
static const int MAXN = 500005; | |
static const int MAXQ = 500005; | |
struct Node { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
const int N = 100009; | |
int ec,son[N],lnk[N * 2],nxt[N * 2],col[N],fa[N]; | |
struct lct | |
{ | |
int l[N],r[N],p[N],sz[N],w[N]; | |
void init(int n) | |
{ | |
++n; | |
for (int i = 0; i <= n; ++i) l[i] = r[i] = p[i] = sz[i] = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <limits.h> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
class IMAGE { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
// in AES, GF(2^8), m(x) = x^8 + x^4 + x^3 + x + 1 | |
class GaloisField { | |
public: | |
unsigned char v[32]; | |
int n; | |
GaloisField() { | |
n = 8; |
-
Follow
- What is a monoalphabetic cipher ?
- How large is the key space of the monoalphabetic cipher applied to English (just consider lower case letters) ?
- What is the main security weakness of a monoalphabetic cipher ?
- Please provide at least 4 approaches to prevent the above weakness.
-
Block ciphers process messages in blocks like an extremely large substitution, but this is very difficult to implement for a very big block size. What is Shannon's idea to realize a block cipher with big block size ?
-
The S-box of DES round operation is not invertable, but why DES can decrypt ?
將原本的檔案複製到新的 new_dir,或者直接刪除 .git。
cd new_dir
git init
使用 forced updated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e5yhJOj8cDmJV0h4d1G9lfvDbklwRtpabTWVVfzhdJGVF4t4c2CZIv6FMDT9QLyeN1j6MUwhOcDycQw3M6zNMBzBNEiQwui8duGt9d0JY9WrxyHHbw2lxmkLIgjyoty4Lsjecg0JNljbINwIMYDlIyynM5zCEawsMXDuk93HZvSTsKynMXi6wSi4dcXhBnn0cSm3Fzk4ZCXLM5iCO1nDsLiDMoiCIv6ndBHDJP1ZZ8S4wniOMCynIP6Cd4HTJU1QZjSLwDiFNQCpIV6AdJHNJ11bZcSjwBi1NNS1IG6edRH4JY1pZySBwoiSN9iNIv64d2HpJE1qZgSSwuiENyyxIg6odcHlJW1kZNSVwSiVOWC7IZ6JdaHjJL1cZGSawUi0OiSzIX6HdtHkJg19ZBSSw0iKMNTEAFi6OhnKRmyvdLWFUZs7IQj2ESxZI5jdpO0ZcUn2VmlyLUCBIwxqMFisIS6Od1HWJg10Z4SYwUirMbTwMwi9OXnQR5yKdRWTUgsvIQjjEV04IUjPpC0wcbn3VUlfLoCFIoxcNXSEIN6qdAHmJe1aZTSpwoiaMXTjYwirOBnERTyQdIWCUnsbIfjPEJ32IrjfpD0mcznHVDlDLhCRIxxPO1C4Il6Pd8HqJK1pZHSEwIiLMuTIkPiGOUnaR3y7dXWDUPsRIsjmIGw6Iqj1ph0gcHnhVClyLRCaIdygMnSaIZ6od5HZJ71oZ9ScwvidMvjbIxidO9nlRsy1dLWIUCsTI6joIlzYIAjYpa07cknnVXl5LiCwISyJNCCUIG6PdIHpJk1lZJSNwyifMmjyUkiQONnGRTybdYWlU5sYIGjFIj21INjjpz0UcOnTVIlpLAC1Iey1NVyPIo65doH1Jz11ZASIwoi6MUjVgRi3OTnNRvyUdiWTUPstIVjyI65pIQj9pZ0lcjniVClSLQCZIczeMBCaIy6vdqHlJ51UZdSlwAiNMrz2EAiLOmn6ROyNdGWKUysoINjDMZypIPjqpP0XcFnIVAlpLqCpIQzW |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You can edit this code! | |
// Click here and start typing. | |
// http://hdechallenge.appspot.com/challenge?email=b7615199%40hotmail.com&key=9160760b19bc9fe7dd746d2d53e23e86640f1d71 | |
package main | |
import "fmt" | |
func sum(n int) int { | |
if n == 0 { | |
return 0 |