more
```cpp
include
include
using namespace std;
typedef long long ll_t;
bool load_input(vector & s) {
s.clear();
int n;
if (!(cin >> n))
return false;
for (int i = 0; i < n; i++) {
ll_t k;
if (!(cin >> k))
return false;
s.push_back(k);
}
return true;
}继续阅读 »
记得11年的时候,觉得这道题爆难,根本无从下手。三年后再次回顾,终于AC了,就当是对表达式求值和动态规划的复习吧。
题目:Link
```cpp
// Accepted.
include <iostream>
define Mod 10007;
using namespace std;
typedef struct {
long long v0; //当前值为0的个数
long long v1; //当前值为1的个数
char ch; //当前字符
} vertex;
vertex f[100000];
void merge_sum(int p) {
int w0 = f[p-1继续阅读 »
分析:不需要一般象棋程序的“着法生成器”也可以求解more
```cpp
include
include
using namespace std;
typedef char Board[8][8];
typedef struct _Position {
int row;
int col;
} Position;继续阅读 »
题目
It is said that Vigenere cipher does not achieve the perfect secrecy actually :-)
Tips:
1.The encode pragram is given;
2.Do u no index of coincidence ?
3.The key is last 6 words of the plain text(with "nctf{}" when submitted, also without any interpunction)
encode.cpp code.txt
什么是异或
异或(exclusive or)是二元继续阅读 »