题目链接:https://codeforces.com/contest/1089/problem/E Elma is learning chess figures. She learned that a rook can move either horizontally or vertically. To enhance her understanding of rook ...
\(C_{x+y}^y\)的公式,DP容斥删多余贡献。 #include <cstdio> #include <iostream> #include <cstring> #include <algorithm> #include <cmath> #define R(a,b,c) for(register in...
这题是2020百度之星初赛第三场1005 题意描述 一个长度为n的棋盘(1≤n≤10001\leq n\leq10001≤n≤1000),恰好放置m个传送门(0≤m≤10000\leq m\leq10000≤m≤1000),传送门可以向之前的任意一点...