893

Codeforces Round 893 (Div. 2) C. Yet Another Permutation Problem

有一个 \(gcd\) 游戏,按以下步骤进行: 选择一个 \(n\) 的排列 \(p_1, p_2, \cdots, p_n\) 。 对于每个 \(i\) ,\(d_i = gcd(p_i, p_{i \% n + 1})\) 排列 \(p\) 的 \(score\) 为数组 \([d_1, d_2 ......
Permutation Codeforces Another Problem Round

[893] Add comments at a batch file (CMD)

ref: How do I do comments at a Windows command prompt? REM is the standard way: REM this is a comment You could also use the double-colon convention c ......
comments batch file 893 Add

CF893F

# CF893F 首先,我们发现,这个题只需要子树内的答案,且只需要维护最小值。 注意到对于两个点 $i,j$,若 $dep_i>dep_j$,且 $val_i\ge val_j$,则对于 $lca(i,j)$ 及其它的父亲,$i$ 都是一个无用的点。 注意到 $n\le 10^5,m\le 10^ ......
893F 893 CF

Codeforces Round 893 (Div. 2) A-C题解

CF 893 (Div.2) A. Buttons 签到题。两人会优先选择c中的按钮来,避免自己的按钮消耗同时减少对方可选择的按钮。所以c % 2 == 1等价于a的按钮数+1,c % 2 == 0时相当于c按钮不存在,比较a b 按钮的数量来得出答案即可。 #include<iostream> u ......
题解 Codeforces Round 893 A-C

Codeforces Round 893 Div.2 A~E2

# [Codeforces Round 893 Div.2 A~E2](https://codeforces.com/contest/1858) [CF1858A](https://www.luogu.com.cn/problem/CF1858A) > 有 $a+b+c$ 个球。 > 其中的 $a$ ......
Codeforces Round 893 Div E2

Codeforces Round 893 (Div. 2)

# Preface 最战俘的一场,B题写挂一发后整个人脑子就不清醒了,放着D不写去写E1,然后忘了可持久化栈有一个经典的倍增写法,最主要当时暑假前集训我还上去讲了这个东西然后比赛的时候还没想起来 后面目送徐神爆切5题成功完成两场从蓝上橙,狠狠地把我这个在紫卡了半年的废物羞辱了一波 不过确实说实话我们 ......
Codeforces Round 893 Div

2023.08.12 codeforces round 893 div2

年轻人的第四场div2 rank:8217 solved:2 rating change:+31 new rating:1354 A.Buttons 题意:给定a,b,c三种按钮的数量,a按钮只能被Anna按,b按钮只能被Katie按,两个人都可以按c按钮,最后没有按钮可以按的人输,Anna先手,问 ......
codeforces round 2023 div2 893

Codeforces Round 893 (Div. 2)

Codeforces Round 893 (Div. 2) A - Buttons 思路:将第三种按钮平分给两人,若第一个人的按钮数大于第二个人则First #include<bits/stdc++.h> using namespace std; #define int long long //#d ......
Codeforces Round 893 Div

Codeforces Round 893(div2)

# Codeforces Round 893(div2) [A题传送门]([Problem - A - Codeforces](https://codeforces.com/contest/1858/problem/A)) ## A题意: 我们有a+b+c个瓶盖,选手1可以拿指定的a个或者c个里面的 ......
Codeforces Round div2 893 div

Counting Arrays CF893E

给出x和y,求一个长度为y的序列,其乘积为x,允许有负数,求这种序列的个数, x分解质因数,考虑每个 p^e, 把e分为y 份( 可以为0),个数为 C( e+y-1,e) 这题需要乘法逆元 来进行乘法 #include <iostream> #include <cstring> #include ......
Counting Arrays 893E 893 CF
共10篇  :1/1页 首页上一页1下一页尾页