相关文章
CodeForces 761B Dasha and friends
题目链接:http://codeforces.com/contest/761/problem/B 题意:给一个圆环,告诉你两个序列a,b,a[i],b[i]分别表示在圆环上的位置,现问你,能否通过移动整体一个数组使得他的两个序列相等 解析:这和Gym - 10…
建站知识
2025/1/7 22:17:28
codeforces 761A Dasha and Stairs
点击打开链接 A. Dasha and Stairs time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output On her way to programming school tiger Dasha faced her first test — a huge staircase! The steps were numbered fr…
建站知识
2025/1/7 8:08:42
codeforces 761 D. Dasha and Very Difficult Problem(二分+贪心)
题目链接:http://codeforces.com/contest/761/problem/D 题意:给出一个长度为n的a序列和p序列,求任意一个b序列使得c[i]b[i]-a[i],使得c序列的大小顺序和p序列一样。 p序列给出的的是1~n不重复的数。还有给出的l和r是b序列的大小范…
建站知识
2025/1/7 14:35:00
Dasha and Stairs CodeForces - 761A
Dasha and Stairs 题目链接: CodeForces - 761A 题意:问能否找到一段连续整数, 使得偶数与奇数的个数与给出数据相同;只要两数差值<1即可;注意特判0, 0; #include<iostream>
#include&…
建站知识
2025/1/23 17:57:14
【LeetCode】761 Special Binary String
【LeetCode】761 Special Binary String
题干:
Special binary strings are binary strings with the following two properties: - The number of 0’s is equal to the number of 1’s. - Every prefix of the binary string has at least as many 1’s as 0’s.
Given…
建站知识
2025/1/13 12:48:32
761. 特殊的二进制序列
特殊的二进制序列是具有以下两个性质的二进制序列:
0 的数量与 1 的数量相等。二进制序列的每一个前缀码中 1 的数量要大于等于 0 的数量。
给定一个特殊的二进制序列 S,以字符串形式表示。定义一个操作 为首先选择 S 的两个连续且非空的特殊的子串&am…
建站知识
2025/1/7 21:50:34
JS学习731~761(操作元素+节点操作+DOM重点)
6 操作元素
6.5 排他思想
如果有同一组元素,我们想要某一个元素实现某种样式 ,需要用到循环的排他思想算法:
所有元素全部清除样式(干掉其他人)给当前元素设置样式(留下我自己)注意顺序不能颠倒,首先干掉其他人,再设置自己
<!DOCTYPE html>
<html lang"en&qu…
建站知识
2025/1/7 12:05:30
【Leetcode】761. Special Binary String 特殊的二进制序列
Special binary strings are binary strings with the following two properties:
The number of 0’s is equal to the number of 1’s. Every prefix of the binary string has at least as many 1’s as 0’s. Given a special string S, a move consists of choosing two …
建站知识
2025/1/11 21:47:42