counting atcoder another 259h

【每日一题】AtCoder Beginner Contest 045 | C - たくさんの数式 题解

描述 问题大意:给予一个由数字1至9组成得字符串S,你需要在任意两个相邻的数字之间加入符号“+”,求取所得的数学表达式的值。计算所有有可能的数学表达式的结果的总和。 思路 初初以为简单,但细做之下发现很复杂。冥思苦想之下茅塞顿开,算作柳暗花明又一村了。 对于任何一个数字字符串,都可以将其拆分为有限个 ......
题解 Beginner AtCoder Contest 045

【杂题乱写】AtCoder-ARC112

AtCoder-ARC112A B=C 在 \(C\) 处计算答案,有: \[ans=\sum_{C=L}^{R-L} (R-L+1)-C=\dfrac{(R-2L+1)(R-2L+2)}{2} \]提交记录:Submission - AtCoder AtCoder-ARC112B -- - B 操 ......
AtCoder-ARC AtCoder ARC 112

AtCoder Beginner Contest 218

[ABC218E] Destruction 题意翻译 给一个无向图,让你从中选出几个边,要求选出的边权总和最大并且剩下的图要是一个连通图,输出最大的边权。 贪心的想剩下来的图一定是一个树结构,那么要满足去掉的边权和大,就可以想到最小生成树,用总边权减去最小生成树就是答案 [ABC218F] Bloc ......
Beginner AtCoder Contest 218

atcode abc318,codeforce 1861

题目链接 题解 目录AtCoder abc318_a Full MoonAtCoder abc318_b Overlapping sheetsAtCoder abc318_c Blue SpringAtCoder abc318_d General Weighted Max MatchingAtCod ......
codeforce atcode 1861 abc 318

【题解】AtCoder-ABC319

AtCoder-ABC319A Legendary Players 使用 map 即可。 提交记录:Submission - AtCoder AtCoder-ABC319B Measure 依题意模拟。 提交记录:Submission - AtCoder AtCoder-ABC319C False ......
题解 AtCoder-ABC AtCoder ABC 319

AtCoder Beginner Contest 217

[ABC217E] Sorting Queries 维护一个空序列 A ,有 Q 次查询: 在 A 的最后插入一个元素一个元素 x 输出 A 的第一个元素并删除这个元素 将这个序列排序 用 deque 和 multiset 维护,复杂度应该是$O(\space log(\space n \space ......
Beginner AtCoder Contest 217

No system found in another group for import queue

Symptom You find all the transport requests that in the import queue have a "green arrow" icon, which means the status is "Data file must still be tra ......
another system import found group

[ABC319G] Counting Shortest Paths 题解

题意 给定由 \(N\) 个节点组成的无向完全图 \(G\),并删去 \(M\) 条边,求该图的最短路数量。 (\(2 \le N \le 2 \times 10^5, 0 \le M \le \min\left\{2 \times 10^5, \dfrac{N(N - 1)}{2}\right\} ......
题解 Counting Shortest Paths 319G

[AtCoder] Lucky 7 Battle

Problem Statment Assume the first N - 1 rounds have been played and we are left with a %7 value R. There are 2 cases depending on who plays the last r ......
AtCoder Battle Lucky

【题解】CF1830B The BOSS Can Count Pairs

你考虑,我们观察数据范围,发现可以是 \(O(n\sqrt n) / O(n\log n)\) 的,我们又看到乘法,便有几个大概的想法: 数论分块 \(O(\sqrt n)\) 枚举其中一个乘数 还有什么……(笔者学识浅陋,读者可以帮忙补充) 我们可以找到两种 \(O(n^2)\) 做法: \(O( ......
题解 1830B Count Pairs 1830

[ABC319G] Counting Shortest Paths

[ABC319G] Counting Shortest Paths Atcoder:[ABC319G] Counting Shortest Paths 洛谷:[ABC319G] Counting Shortest Paths Problem 经典问题:求补图的最短路,边权均为 \(1\),并顺带求出 ......
Counting Shortest Paths 319G ABC

AtCoder Beginner Contest 319 - C(模拟题)

目录C - False HopeD - Minimum Width C - False Hope 题意 给定一个 $3 \times 3 $ 的矩阵。 以一个随机的顺序先后看这 9 个数,如果说某一行或者某一列或者某一对角线上的三个数看到的先后顺序满足先看到相同的两个数,再看到不同的一个数,则此次观 ......
模拟题 Beginner AtCoder Contest 319

【题解】 AtCoder Beginner Contest 319

没有写 F,不确定我的做法对不对。 评价:什么牛逼场次,代码大赛是嘛,从 A 开始就感觉到不对了,而且题面写的真答辩。 A.Legendary Players 题目分析: 直接按题目模拟即可。 代码: 点击查看代码 #include<bits/stdc++.h> using namespace st ......
题解 Beginner AtCoder Contest 319

AtCoder Beginner Contest 319

A - Legendary Players (abc319 A) 题目大意 给定rating前10的选手名字和对应分数。 给定名字,问对应分数。 解题思路 复制一下,建个数组,然后一个一个判断即可。Python更好写一点。 神奇的代码 #include <bits/stdc++.h> using n ......
Beginner AtCoder Contest 319

$AtCoder Beginner Contest 319$

\(A - Legendary Players\) map<char ,int >mp; void solve(){ string s; cin>>s; cout<<mp[s[0]]<<'\n'; //puts(ans>0?"YES":"NO"); //puts(ans>0?"Yes":"No"); ......
Beginner AtCoder Contest 319

[AGC058D] Yet Another ABC String

# [AGC058D] Yet Another ABC String [Atcoder:[AGC058D] Yet Another ABC String](https://atcoder.jp/contests/agc058/tasks/agc058_d) [洛谷:[AGC058D] Yet Ano ......
Another String 058D AGC 058

【题解】AtCoder Regular Contest 161

评价:感觉这场题目质量不咋地啊,都是一些乱搞题 ## A.Make M ### 题目描述: $N$ 是一个正奇数。我们称一个长度为 $N$ 的序列 $S$ 是 **M 型**序列,当前仅当对于所有的 $i=2,4,6,\dots,N-1$(即偶数位),都有 $S_{i-1}S_{i+1}$。 现在给 ......
题解 AtCoder Regular Contest 161

P2633 Count on a tree 题解(外加DFS序求LCA)

`2023-07-22 09:53:59 顶置3` # P2633 Count on a tree ## 前置小知识 # 冷门小科技:DFS-RMQ 求LCA 最近跟着洛谷榜一的博客学了一个冷门科技:DFS序求LCA,这道题刚好要求LCA,所以就刚好适用一下。 [$\color{Red}{原博客地址 ......
题解 P2633 Count 2633 tree

CF1857G Counting Graphs

`2023-08-08 23:00:07 solution` ## 题意: 求有多少个有 $n$ 个节点的无向图,使其满足以下条件: - 无重边自环。 - 有且只有一个最小生成树,且为给定树。 - 最大边权不大于 $S$。 对 $998244353$ 取模。 ## 思路: 其实就是让我们在给定的树加 ......
Counting Graphs 1857G 1857 CF

【题解】AtCoder Regular Contest 162

## A.Ekiden Race ### 题目描述: 有 $n$ 个人参加了往返赛跑,每个人有一个编号 $1$ 到 $n$。已知以下信息: - 如果按照往路的成绩排序,那么任何两个人的成绩都不相同。同时第 $i$ 个人在往路中排名第 $i$。 - 如果按照往返的成绩排序,那么任何两个人的成绩都不相同 ......
题解 AtCoder Regular Contest 162

AtCoder Grand Contest 041 F Histogram Rooks

[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc041_f "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc041/tasks/agc041_f "AtCoder 传送门") 神题!!!!!!! ......
Histogram AtCoder Contest Grand Rooks

AtCoder Beginner Contest 318 - D(状压 dp)

[toc] # [D - General Weighted Max Matching](https://atcoder.jp/contests/abc318/tasks/abc318_d) **题意** 给定无向图,边有边权。让你选择一组边,满足任意两边不相交且总边权和最大。 顶点数 $\le 16 ......
Beginner AtCoder Contest 318 dp

[题解] AtCoder Beginner Contest 308 A~G

# AtCoder Beginner Contest 308 A~G ## A. New Scheme ```cpp void Main() { vector a(8); for (auto &x : a) cin >> x; if (!is_sorted(a.begin(), a.end()) & ......
题解 Beginner AtCoder Contest 308

AtCoder Beginner Contest 216

Tasks - AtCoder Beginner Contest 216 [ABC216D] Pair of Ball 可以发现对于栈中每个元素是被他上面的元素所约束,用拓扑排序表示这种约束 [ABC216F] Max Sum Counting dp合集 [ABC216G] 01Sequence 差 ......
Beginner AtCoder Contest 216

AtCoder Grand Contest 064

# Preface AGC好难啊,从C题开始就一点不会了,感觉以前OI时候的AGC没那么变态的啊,也许是我变菜好多了吧 # **A - i i's** 考虑先放一个这样的序列: $$ n,n-1,n,n-1,n\cdots,n-1,n,n-2 $$ 这样就把$n,n-1$都用完了,同时还用了个$n- ......
AtCoder Contest Grand 064

【题解】AtCoder Regular Contest 163 A-D

E 太过于 adhoc,F 太过于神仙,就不做了。 ## A.Divide String ### 题目描述: 多组数据。 给出一个长为 $N$ 的字符串,问能否将其划分为多段,使字典序**严格**上升,保证 **$\sum{N}\le2000$**。 $ 2\ \le\ N\ \le\ 2000 $ ......
题解 AtCoder Regular Contest 163

【题解】AtCoder Beginner Contest 318(D - Ex)

赛时过了 A-G,Ex 仿佛猜到了结论但是完全不懂多项式科技,就炸了。 大家好像都秒了 A,B,C 就不写了。 ## D.General Weighted Max Matching ### 题目描述: 给你一个加权无向完全图,图中有 $N$ 个顶点,编号从 $1$ 到 $N$。连接顶点 $i$ 和 ......
题解 Beginner AtCoder Contest 318

AtCoder Beginner Contest 318

> 咕咕咕,总力战还没打,凹不过卷狗,躺了.jpg ## [A - Full Moon (abc318 A)](https://atcoder.jp/contests/abc318/tasks/abc318_a) ### 题目大意 给定$n, m, p$,问有多少个 $i$满足 $0 神奇的代码 ` ......
Beginner AtCoder Contest 318

AtCoder Beginner Contest 318

## A - Full Moon ### Problem Statement Takahashi likes full moons. Let today be day $1$. The first day on or after today on which he can see a full mo ......
Beginner AtCoder Contest 318

GCD Counting题解

## 题意 有一棵有 $n$ 个节点的树,第 $i$ 个节点有点权 $a_i$。 定义 $g(x,y)$ 为 $x$ 到 $y$ 的树上路径所经过的点的点权 $\gcd$。 对于每一个正整数 $k\in[1,2\times 10^5]$ 求出满足以下条件的 $x,y$ 的对数: + $1\le x\ ......
题解 Counting GCD