Codeforces Round #566 (Div. 2)题解

时间\(9.05\)好评

A Filling Shapes

宽度为\(3\),不能横向填

考虑纵向填,长度为\(2\)为一块,填法有两种

如果长度为奇数则显然无解,否则\(2^{n/2}\)

B Plus from Picture

找到最靠上的十字轮廓(没有则直接无解),删掉后判断有无多余

C Beautiful Lyrics

以元音数量及最后的元音(如果没有元音的那些分别赋不同的负数)为一二关键词

开两个栈,代表诗头和诗尾

排序后,得到的以第一关键字的块,尽量把每一对放到诗尾,因为诗尾的也可以当诗头

最后答案就是两个栈贪心取就好了

D Complete Mirror

感觉要换根,反正觉得是神仙题qwq

E Product Oriented Recurrence

最后十分钟打算看下题:原来是**题,比\(C\)题简单想而且好打

\(c\)显然好处理不管,用\(f_4,f_5,f_6\)用\(f_1,f_2,f_3\)表示出来\((\)因为这样三个次数均不为\(0)\)

发现每部分独立且次数相加为后一位的,直接矩阵快速幂处理系数就好了

不肛这么久\(D\)题直接打\(E\)就进前一百了,每次比赛都因为各种原因。。。

F Maximum Sine

还没看题,感觉也不可做的样子

原文地址:https://www.cnblogs.com/y2823774827y/p/11006954.html

时间: 2024-08-29 14:23:13

Codeforces Round #566 (Div. 2)题解的相关文章

Codeforces Round #262 (Div. 2) 题解

A. Vasya and Socks time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has n pairs of socks. In the morning of each day Vasya has to put on a pair of socks before he goes to school. When

Codeforces Round #FF (Div. 2) 题解

比赛链接:http://codeforces.com/contest/447 A. DZY Loves Hash time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output DZY has a hash table with p buckets, numbered from 0 to p?-?1. He wants to insert n 

Codeforces Round #259 (Div. 2) 题解

A. Little Pony and Crystal Mine time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Twilight Sparkle once got a crystal from the Crystal Mine. A crystal of size n (n is odd; n?>?1) is an n?×?n 

Codeforces Round #177 (Div. 2) 题解

[前言]咦?现在怎么流行打CF了?于是当一帮大爷在执着的打div 1的时候,我偷偷的在刷div 2.至于怎么决定场次嘛,一般我报一个数字A,随便再拉一个人选一个数字B.然后开始做第A^B场.如果觉得机密性不高,来点取模吧.然后今天做的这场少有的AK了.(其实模拟赛只做完了4题,最后1题来不及打了) 等等,话说前面几题不用写题解了?算了,让我难得风光一下啦. [A] A. Polo the Penguin and Segments time limit per test 2 seconds mem

Codeforces Round #534 (Div. 2)题解

Codeforces Round #534 (Div. 2)题解 A. Splitting into digits 题目大意 将一个数字分成几部分,几部分求和既是原数,问如何分可以使得分出来的各个数之间的差值尽可能小 解题思路 将n分成n个1相加即可 AC代码 #include<cstring> #include<string> #include<iostream> #include<cstdio> using namespace std; int main

Codeforces Round #561 (Div. 2) 题解

Codeforces Round #561 (Div. 2) 题解 题目链接 A. Silent Classroom 水题. Code #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 105; int n; char s[N], t[N]; int main() { cin >> n; for(int i = 1; i <= n; i++) { scanf(&q

Codeforces Round #566 (Div. 2)

Codeforces Round #566 (Div. 2) A Filling Shapes 给定一个 \(3\times n\) 的网格,问使用 这样的占三个格子图形填充满整个网格的方案数 如果 \(n\) 是奇数,那么显然无解,否则考虑每个 \(3\times2\) 的方格正好能塞下两个这玩意而且必须这样塞进去,方案数为 \(2\),因此答案为 \(2^{n/2}\) B Plus from Picture 给定一个 \(h\times w\) 的矩阵,每个元素为 "." 或者

Codeforces Round #608 (Div. 2) 题解

目录 Codeforces Round #608 (Div. 2) 题解 前言 A. Suits 题意 做法 程序 B. Blocks 题意 做法 程序 C. Shawarma Tent 题意 做法 程序 D. Portals 题意 做法 程序 E. Common Number 题意 做法 程序 结束语 Codeforces Round #608 (Div. 2) 题解 前言 题目链接:仅仅只是为了方便以题目作为关键字能查找到我的题解而已(逃 Codeforces 1271A Codeforce

Codeforces Round #617 (Div. 3) 题解

目录 Codeforces Round #617 (Div. 3) 题解 前言 A. Array with Odd Sum 题意 做法 程序 B. Food Buying 题意 做法 程序 C. Yet Another Walking Robot 题意 做法 程序 D. Fight with Monsters 题意 做法 程序 E1. String Coloring (easy version) 题意 做法 程序 E2. String Coloring (hard version) 题意 做法