Unique Encryption Keys 题目链接: http://acm.hust.edu.cn/vjudge/problem/26633 Description http://7xjob4.com1.z0.glb.clouddn.com/bced90d15c27e75270cc759651dcfa63 Input The input contains several cipher descriptions. Each description starts with one line co…
题目链接:点击打开链接 #include <cstdio> #include <vector> using namespace std; typedef long long ll; ll re; vector<int> p; void dfs(int dep, int g) { if (dep == 0) return ; if (p[dep-1] == 1) { re += (dep-1) * (1ll<< (dep-2)); re += g * (1ll…