codeforces round 910 div

Vue3之实现一个可拖拽的div

实现一个可拖拽的div写法如下: const chatbox = ref(); const dragx = (el) => { let oDiv = chatbox.value; //当前元素 let disX = el.clientX - oDiv.offsetLeft; let disY = e ......
Vue3 Vue div

汇编-div无符号整数除法

在32位模式下, DIV(无符号整数除法) 指令执行8位、16位及32位的无符号整数除法。无符号除法(unsigned division) 定义为一个无符号数除以另一个无符号数。其中, 除数为单个寄存器或内存操作数。格式如下: ......
除法 整数 符号 div

codeforces刷题(1100):1907C_div3

C、Removal of Unattractive Pairs 跳转原题点击此:[该题地址](Problem - 1907C - Codeforces) 1、题目大意 给定一个字符串,可以删除相邻的两个不相等的字符。问你删除后能得到最小的字符串长度为多少。 2、题目解析 因为只要两个不相等的字符相邻 ......
codeforces C_div 1100 1907 div

CF contest 1909 Pinely Round 3 (Div. 1 + Div. 2) 题解(Vanilla的掉分赛)

[Pinely Round 3 (Div. 1 + Div. 2) - Codeforces](https://codeforces.com/contest/1909) $$ \color{purple}\large\textbf{世界上只有一种真正的英雄主义,} $$ $$ \color{red}... ......
题解 Div contest Vanilla Pinely

Pinely Round 3 (Div. 1 + Div. 2)

A 构造题,分两种情况考虑 上下都行,左右选一个 左右都行,上下选一个 void solve() { int n; cin >> n; vector<pair<int, int> > a(n); for(auto &t : a) cin >> t.x >> t.y; sort(a.begin(), ......
Div Pinely Round

CodeForces 1909D Split Plus K

洛谷传送门 CF 传送门 设最后每个数都相等时为 \(t\)。那么一次操作变成了合并两个数 \(x, y\),再增加 \(x + y - k\)。于是每个 \(a_i\) 可以被表示成 \(b_i t - (b_i - 1)k\) 的形式,化简得 \(a_i - k = b_i (t - k)\)。 ......
CodeForces 1909D Split 1909 Plus

CodeForces 1909E Multiple Lamps

洛谷传送门 CF 传送门 感觉这个题比较难蚌。 发现按 \(1 \sim n\) 最后可以把 \(1 \sim n\) 中的所有平方数点亮。所以 \(n \ge 20\) 就直接输出 \(1 \sim n\)。 考虑 \(n \le 19\)。猜测合法的方案(即按完后亮灯数 \(\le \left\ ......
CodeForces Multiple 1909E Lamps 1909

CodeForces 1909F2 Small Permutation Problem (Hard Version)

洛谷传送门 CF 传送门 感觉这个题还是挺不错的。 考虑 F1。考察 \(a_i\) 差分后的意义,发现 \(a_i - a_{i - 1}\) 就是 \((\sum\limits_{j = 1}^{i - 1} [p_j = i]) + p_i \le i\)。 考虑将其转化为棋盘问题。在 \(( ......

Pinely Round 3 (Div. 1 + Div. 2) A~D

A. Distinct Buttons // #include <bits/stdc++.h> #include <iostream> #include <string> #include <cstring> #include <vector> #include <algorithm> #inclu ......
Div Pinely Round

Pinely Round 3 (Div. 1 + Div. 2)

\(A.Distinct Buttons\) https://codeforces.com/contest/1909/submission/238508091 \(B.Make Almost Equal With Mod\) https://codeforces.com/contest/1909/s ......
Div Pinely Round

Codeforces 1900E Transitive Graph

考虑题目的限制条件:存在 $a\to b, b\to c$ 的边,就会有 $a\to c$ 的边。 考虑 $p_{1\sim k}$,满足这 $k$ 个点按顺序组成了一个环且无重点。 那么 $p_1\to p_2, p_2\to p_3$,就有 $p_1\to p_3$,又有 $p_3\to p_4 ......
Codeforces Transitive 1900E Graph 1900

codeforces比赛(1):codeforces 916_div3

我的第一篇博客,虽然发布的都是非常简单的算法题,也没人看。我希望未来当我算法水平提高一个档次来看或许会有新的感受。这次cf比赛第一次写出来div3的D题,并且还剩余1小时,非常开心,一定继续保持下去。 ......
codeforces div3 916 div

CodeForces 331E2 Deja Vu

洛谷传送门 CF 传送门 考虑一条好的路径 \(x \to y\) 中一定至少存在一条边 \((u, v)\),满足这条边的序列 \(a\) 存在一个 \(j \in [1, |a| - 1]\),满足 \(a_j = u, a_{j + 1} = v\),就是说 \(a\) 包含一对相邻的 \(( ......
CodeForces 331E2 331E Deja 331

Codeforces Round 651 (Div. 2)C. Number Game(数学思维数论)

C. Number Game 我们考虑那些状态是必胜态 我的回合时n为奇数(除1外),直接除以n则必胜 下面偶数的情况稍复杂 偶数我们能进行的操作只有除以一个奇数,需要考虑怎么把当前状态变为对手的必败态 偶数一定含2的因子,\(n=2^k*q,q为奇数\) 当\(k=1时如果q\)是一个质数那么只能 ......
数论 Codeforces 思维 数学 Number

动态给div赋值高,使页面高度100%

import { ref, onMounted, onUnmounted, computed, nextTick } from 'vue' const boxRef = ref() const searchBoxRef = ref() const tableBoxHeight = ref(0) co ......
高度 页面 动态 100% div

在div之前画一条连接线

<html> <head> <style> div.boxItem { display: inline-block; border: 1px solid black; padding: 1em; margin-right: 5em; position: relative } .boxItem:bef ......
连接线 div

Codeforces Round 638 (Div. 2)B. Phoenix and Beauty

B. Phoenix and Beauty 这道题目学到的东西: 从给出的数据范围观察,得到一些有用信息(峰哥教的) 考虑无解的情况‘ 其实这题考虑怎么操作是比较难的,如果能想出来满足条件的结果就比较好了(我在说什么我自己也不知道,算了直接看下面的图吧) 假设\(k=3\),下面是我们得到的结果数列 ......
Codeforces Phoenix Beauty Round 638

[Codeforces] CF1579C Ticks

CF1579C Ticks 题意 \(n \times m\) 的棋盘,左上角和右下角坐标分别为 \((1, 1), (n, m)\),一开始每个格子为白色。 每次操作可以选择一个格子 \((x, y)\) 以及左上角和右上角方向的 \(d\) 个连续格子染成黑色,并将其称为一个大小为 \(d\) ......
Codeforces 1579C Ticks 1579 CF

[Codeforces] CF1817A Almost Increasing Subsequence

CF1817A Almost Increasing Subsequence 题意 给定长度为 \(n\) 一个序列 \(a\) 以及 \(q\) 次询问,每次询问给出 \(l\) 和 \(r\),找出序列 \(a\) 在 \([l,r]\) 内最长的几乎递增子序列。 对于几乎递增的定义:如果一个序列 ......

[Codeforces] CF1811E Living Sequence

CF1811E Living Sequence 这道题洛谷题解的思路比我的更好,可以参考一下题解,但是没人提到我这种做法 题意 给定一个正整数 \(k\) \((1\le k\le10^{12})\),请你输出第 \(k\) 个数字里没有 4 的正整数。 思路 设 \(f_i\) 表示前 \(10^ ......
Codeforces Sequence Living 1811E 1811

CSS设置div高度自动全屏

对body和html都设置高度100% html,body { height: 100%; width: 100%; margin: 0 0 0 0; padding: 0 0 0 0; position: relative; } 然后再对div设置100% #app { height: 100%; ......
高度 CSS div

CodeForces 1913E Matrix Problem

洛谷传送门 CF 传送门 考虑费用流,对于每一行建两个点 \(i_0, i_1\),分别代表这一行的所有 \(0, 1\)。同样每一列建两个点 \(j_0, j_1\)。源点分别向 \(i_0, i_1\) 连流量为这一行要求的 \(0\) 或 \(1\) 的个数,费用为 \(0\)。同理连汇点。 ......
CodeForces Problem Matrix 1913E 1913

Codeforces Round 916 (Div. 3)

目录写在前面ABCDE1/E2FG1G2写在最后 写在前面 比赛地址:https://codeforces.com/contest/1914。 第二天没早八打个 div3 休闲娱乐保持下手感,然而 div3 都 AK 不了了,纯纯废物一个,天天上大学导致的。 唉,一学期碰上好几个 byd 恼弹老师, ......
Codeforces Round 916 Div

Educational Codeforces Round 160 (Rated for Div. 2)

A. Rating Increase 字符串处理 #include<bits/stdc++.h> using namespace std; void solve(){ string s; cin>>s; int n=s.size(); s=" "+s; for(int i=1;i<=n-1;i++) ......
Educational Codeforces Round Rated 160

Codeforces Round 914 (Div. 2)A~D

A. Forked! 题意:有骑士,国王,王后,给出骑士的攻击方式,骑士的攻击方式类似象棋中的马,一个方向长度为1,一个方向长度为2,有8个位置,骑士的两方向攻击长度为a,b,当a,b不等的时候,有8个位置,相同则有4个位置,询问骑士能同时攻击到国王和王后的位置有几个(采用多组输入形式) 范围:给出 ......
Codeforces Round 914 Div

Codeforces Round 916 (Div. 3)

A. Problemsolving Log map枚举字母 #include<bits/stdc++.h> using namespace std; void solve(){ int n; string s; cin>>n>>s; int ans=0; s=" "+s; map<char,int> ......
Codeforces Round 916 Div

Codeforce Round 916(div3)

Codeforces Round 916(div3) [Problem - A - Codeforces]:Problemsolving Log A.题 直接看样例进行分析,发现每一次出现的字符代表着用了1分钟来看这道题,每道题都有固定的解题时间,只要达到了这个解题时间,就可以将这题解出来 , 答案 ......
Codeforce Round div3 916 div

Codeforces Round 916 (Div. 3)(A~E2)

A 统计一下每个字母的出现次数然后输出即可 #include <bits/stdc++.h> #define rep(i,a,b) for(register int i = (a); i <= (b); ++i) #define fep(i,a,b) for(register int i = (a) ......
Codeforces Round 916 Div E2

CodeForces 1148H Holy Diver

洛谷传送门 CF 传送门 从套娃过来的。 首先考虑如何方便地描述所有子区间的 \(\text{mex}\)。这是一个经典套路,考虑扫描线,扫右端点 \(R\),维护一些极长的段 \([l, r]\) 表示 \([l, R], [l + 1, R], \ldots, [r, R]\) 的 \(\tex ......
CodeForces 1148H Diver 1148 Holy

CF Round 916 (Div. 3)

link A 开个桶。 B 因为 \(k \leq n-1\),尝试让 \(a_2\) 到 \(a_{k+1}\) 有贡献,让 \(a\) 的前 \(k\) 项升序排列,剩余项降序排列即可。 C 假设只做前 \(x\) 个任务(\(x \leq k\)),那么答案 \(f_i\) 最大为 \(\su ......
Round 916 Div CF
共3000篇  :4/100页 首页上一页4下一页尾页