2018SDIBT_国庆个人第三场】的更多相关文章

A - A CodeForces - 1042A There are nn benches in the Berland Central park. It is known that aiai people are currently sitting on the ii-th bench. Another mm people are coming to the park and each of them is going to have a seat on some bench out of n…
A - ACodeForces 1060A Description Let's call a string a phone number if it has length 11 and fits the pattern "8xxxxxxxxxx", where each "x" is replaced by a digit. For example, "80123456789" and "80000000000" are ph…
A - A  这题很巧妙啊,前两天刚好做过,而且就在博客里  Little C Loves 3 I time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Little C loves number «3» very much. He loves all things about it. Now he has a positive in…
A - Complete the Word(暴力) Description ZS the Coder loves to read the dictionary. He thinks that a word is nice if there exists a substring (contiguous segment of letters) of it of length 26 where each letter of English alphabet appears exactly once.…
A - A codeforces 714A Description Today an outstanding event is going to happen in the forest — hedgehog Filya will come to his old fried Sonya! Sonya is an owl and she sleeps during the day and stay awake from minute l1 to minute r1 inclusive. Also,…
2018 HDU多校第三场赛后补题 从易到难来写吧,其中题意有些直接摘了Claris的,数据范围是就不标了. 如果需要可以去hdu题库里找.题号是6319 - 6331. L. Visual Cube 题意: 在画布上画一个三维立方体. 题解: 模拟即可. 代码: #include <bits/stdc++.h> using namespace std; int a, b, c, R, C; char g[505][505]; int main () { int T; cin >>…
原文链接https://www.cnblogs.com/zhouzhendong/p/NowCoder-2018-Summer-Round3-I.html 题目传送门 - 2018牛客多校赛第三场 I 题意 在一个给定的三角形内部随机选择 $n$ 个点,问这些点构成的凸包的期望顶点数. $3\leq n\leq 10$ 题解 首先证明一个结论,对于任意三角形,随机撒 $n$ 个点的期望点数相同. 简单口胡:考虑任意拉扯三角形,三角形内部多边形的凸性都不会改变. 所以,我们只需要随便选择一个三角形…
原文链接https://www.cnblogs.com/zhouzhendong/p/NowCoder-2018-Summer-Round3-G.html 题目传送门 - 2018牛客多校赛第三场 G 题意 给定一个 $n$ 个节点的树,有 $k$ 种颜色. 现在让你给每一个节点都染上一种颜色,总共有 $k^n$ 种方法. 现在问,在所有染色方案中,使得相同颜色点对之间的最短距离为 $D$ 的有多少种方案. 答案对于 $10^9+7$ 取模. $n,k,d\leq 5000$ 题解 首先我们来算…
原文链接https://www.cnblogs.com/zhouzhendong/p/NowCoder-2018-Summer-Round3-D.html 题目传送门 - 2018牛客多校赛第三场 D 题意 给定两个字符串,在根据给定的字符表转成相应的字符之后,问前一个串在后面一个串中匹配了多少次. 一个串在另一个串的某一个位置匹配,当且仅当从该位置起截取长度与那个串相同的一个子串,这个子串与那个串等价. 定义两个串等价,当且仅当这两个串的对应位置的 Ascll 码值相差不大于 1 . 任意一个…
NOI.AC NOIP模拟赛 第三场 补记 列队 题目大意: 给定一个\(n\times m(n,m\le1000)\)的矩阵,每个格子上有一个数\(w_{i,j}\).保证\(w_{i,j}\)互不相同.\(q(q\le5\times10^5)\)次询问,每次给出\(x,y\),询问有多少数满足在本行是第\(x\)大,在本列是第\(y\)大. 思路: 对每行.每列分别排序,求出每个数是本行.本列第几大.然后即可预处理答案. 时间复杂度\(\mathcal O(n^2\log n)\). 源代码…