codeforces powering round hero

[引]Power Automate Use variables and the % notation

Variable manipulation and the % notation - Power Automate | Microsoft Learn 变量操作和 % 表示法 - Power Automate | Microsoft Learn In this articleHardcoded va ......
variables Automate notation Power Use

Codeforces1917F - Construct Tree

Codeforces1917F - Construct Tree Problems 给一个长度为 \(n\) 的序列 \(l\) 和 \(d\)。 要求判断是否可以构造出一颗节点数为 \(n+1\) 的树,满足 \(l\) 的每一个元素唯一对应为一条边的长度,并使整棵树的直径长度恰好为 \(d\)。 ......
Codeforces Construct 1917F 1917 Tree

CodeForces 1906K Deck-Building Game

洛谷传送门 CF 传送门 UNR #2 黎明前的巧克力。 枚举两个人选的卡的并集 \(S\),那么当 \(\bigoplus\limits_{i \in S} a_i = 0\) 时 \(S\) 有贡献 \(2^{|S|}\)。 考虑将 \(2^{|S|}\) 分摊到每个元素上,也就是每个元素有 \ ......
Deck-Building CodeForces Building 1906K 1906

Codeforces1917E - Construct Matrix

Codeforces1917E - Construct Matrix 首先考虑因为 \(n\) 为偶数,所以 \(k\) 为奇数时不可能满足条件。 其次,如果 \(4|k\),那么实际上在矩阵中一直放 \(2\times 2\) 的全为 \(1\) 的矩阵就可以了。 随后,如果 \(k \equiv ......
Codeforces Construct Matrix 1917E 1917

Codeforces Round 917 (Div. 2)

基本情况 A题秒了,B题卡了一年。 B. Erase First or Second Letter Problem - B - Codeforces 卡题分析 两方面原因 没有变通,一开始的思路是公式算出总字串数再想办法找重复的减掉,但搞了一个小时都不可行,应该早点换成正着来找的思路。 没有更深入的 ......
Codeforces Round 917 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

Power BI - 5分钟学习追加查询

每天5分钟,今天介绍Power BI追加查询 什么是追加查询?追加操作是通过将一个或多个表的内容创建一个新表,通过聚合所有表中的列标题,为新表创建架构。 举例:导入三张Sales表,分别是【Sales】,【Sales_BJ】,【Sales_SH】; 请看样例内容 (Excel数据源导入请参考每天5分 ......
Power BI

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

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
共2000篇  :4/67页 首页上一页4下一页尾页