上一页 1 2 3 4 5 6 7 ··· 32 下一页
摘要: 题目传送门:https://codeforces.com/problemset/problem/5/C 题目大意: 给定一串括号序列,求最长合法括号序列的长度及出现次数 考虑将 '(' 变成 1,将 ')' 变成 -1,故合法括号序列的累加和必然为0 考虑求其前缀和,由于括号序列是一一匹配的,故我们 阅读全文
posted @ 2021-07-01 15:57 Wolfycz 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 题目传送门:https://codeforces.com/problemset/problem/547/B 题目大意: 给你一个长度为$n$的序列$A$,对于一个$k\leqslant n$,记$B_{k,i}=\min\limits_{i+k-1}{A_j}$,记$C_k=\max\limits_ 阅读全文
posted @ 2021-07-01 14:47 Wolfycz 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 题目传送门:https://codeforces.com/problemset/problem/91/B 题目大意: 给一个长度为$n$的序列$A$,记 \(B_i=j-i,j=\max\{j|i<j\and A_j<A_i\}\),若不存在这样的 \(j\),则记 \(B_i=-1\),求$B$的 阅读全文
posted @ 2021-07-01 14:23 Wolfycz 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 题目传送门:https://codeforces.com/problemset/problem/18/C 题目大意: 给你一串长度为$A$的序列,问有多少种分割方法,使得两段数字和相同 记前缀和$Pre$,记后缀和$Suf$,求所有$Pre_i=Suf_{i+1}$的点即可 /*program fr 阅读全文
posted @ 2021-07-01 14:14 Wolfycz 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 题目传送门:https://codeforces.com/problemset/problem/767/A 题目大意: 给一个长度为$n$的排列$A$,每次遇到剩余数字的最大项后,将缓存区内从最大项开始的连续递减的数逆序输出;无法输出的数加入或者继续留存在缓存区;无任何输出则输出空行 读入的时候维护 阅读全文
posted @ 2021-07-01 13:49 Wolfycz 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 题目传送门:https://codeforces.com/problemset/problem/349/B 题目大意: 给你总颜料数$v$,再给你9个数$a_{1...9}$,$a_i$表示画$i$的颜料消耗,求所能画出的最大的数 要考虑画的数最大,首先得看位数,位数 \(len\) 可以用 $\l 阅读全文
posted @ 2021-07-01 13:37 Wolfycz 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 题目传送门:https://codeforces.com/problemset/problem/519/B 题目大意: 给你三个序列$A_{1...n},B_{1...n-1},C_{1...n-2}$,问$A,B$序列缺少的数与$B,C$序列缺少的数 排序,瞎搞,怎么做都行 /*program f 阅读全文
posted @ 2021-07-01 13:28 Wolfycz 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 题目传送门:https://codeforces.com/problemset/problem/103/D 题目大意: 给你一串长度为$n$的序列$A$,每次询问给一组$(a,b)\(,求\)\sum\limits_^{\lfloor\frac\rfloor}A_{a+bi}$ 考虑离线,对所有询问 阅读全文
posted @ 2021-06-30 21:53 Wolfycz 阅读(14) 评论(0) 推荐(0) 编辑
摘要: Description 如果一棵树的所有非叶节点都恰好有 \(n\) 个儿子,那么我们称它为严格 \(n\) 元树。如果该树中最底层的节点深度为 \(d\)(根的深度为 \(0\)),那么我们称它为一棵深度为 \(d\) 的严格 \(n\) 元树。例如,深度为2的严格2元树有三个,如下图: 给出 \ 阅读全文
posted @ 2021-06-26 20:53 Wolfycz 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 题目传送门:https://codeforces.com/problemset/problem/280/C Description Momiji has got a rooted tree, consisting of \(n\) nodes. The tree nodes are numbered 阅读全文
posted @ 2021-06-26 02:29 Wolfycz 阅读(17) 评论(0) 推荐(0) 编辑
摘要: Description Find the biggest integer \(n (1\leqslant n\leqslant N)\) and an integer \(x\) to make them satisfy Input The input consists of several tes 阅读全文
posted @ 2021-06-25 21:26 Wolfycz 阅读(29) 评论(0) 推荐(0) 编辑
摘要: Description Tina Town is a friendly place. People there care about each other. Tina has a ball called zball. Zball is magic. It grows larger every day 阅读全文
posted @ 2021-06-25 20:16 Wolfycz 阅读(26) 评论(0) 推荐(0) 编辑
摘要: Description iSea is tired of writing the story of Harry Potter, so, lucky you, solving the following problem is enough. Input The first line contains 阅读全文
posted @ 2021-06-25 19:38 Wolfycz 阅读(25) 评论(0) 推荐(0) 编辑
摘要: Description There is a \(n×m\) board, a chess want to go to the position \((n,m)\) from the position \((1,1)\). The chess is able to go to position \( 阅读全文
posted @ 2021-06-25 16:31 Wolfycz 阅读(16) 评论(0) 推荐(0) 编辑
摘要: Description The so-called best problem solver can easily solve this problem, with his/her childhood sweetheart. It is known that \(y=(5+2\sqrt{6})^{1+ 阅读全文
posted @ 2021-06-25 16:01 Wolfycz 阅读(18) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 32 下一页