Codeforces Round 662 赛后解题报告
Codeforces Round 662 赛后解题报告 梦幻开局到1400+的悲惨故事 A. Rainbow Dash, Fluttershy and Chess Coloring 这个题很简单,我们可以画几张图,发现每一次我们染色的最佳方法就是每次往里面多填一圈,并把上一圈给填满。 比如上图就很好地说明了这个过程,大家可以用画一下 \(n=4,n=5,n=6,n=7\) ,就能验证这个命题了,所以一个 \(n\times n\) 的矩阵有 \(\lfloor\frac{n}{2}\rfloor+1\) 圈,所以直接输出即可。 //Don't act like a loser. //You can only use the code for studying or finding mistakes //Or,you'll be punished by Sakyamuni!!! //#pragma GCC optimize("Ofast","-funroll-loops","-fdelete-null-pointer-checks") //#pragma GCC target("ssse3","sse3","sse2","sse","avx2","avx") #include<bits/stdc++.h> #define int long long using namespace