E. Inverse Coloring time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a square board, consisting of $$$n$$$ rows and $$$n$$$ columns. Each tile in it should be colored either w…
Codeforces 1027E Inverse Coloring 题目链接 #include<bits/stdc++.h> using namespace std; #define N 1010 #define LL long long #define Mod 998244353 int n,k; LL dp[N][N],ans=; LL sum[N][N]; int main(){ cin>>n>>k; dp[][]=; ;i<=n;i++) ;j<=i…
一开始发现的性质是确定了第一行后,后面的行只需要考虑和前面的行相同或者不同,整个过程只需要考虑行,构出的图一定符合性质(即同样满足列的性质),但是接下来死活定义不出状态,事实证明自己还是想的太少了 思路:https://www.cnblogs.com/tobyw/p/9513876.html 代码: #include<bits/stdc++.h> #define ll long long #define mk make_pair #define ft first #define se seco…
D. Beautiful numbers time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if…