题目链接:点击打开链接 #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…
传送门 D. Drazil and Tiles time limit per test 2 seconds memory limit per test 256 megabytes Drazil created a following problem about putting 1 × 2 tiles into an n × m grid: "There is a grid with some cells that are empty and some cells that are occupie…
题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4896 We want to have a great SWERC at Porto this year and we approached this challenge in several ways.We even framed it as a word add…