atcoder-arc atcoder sentou arc

【题解】 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

【题解】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

【题解】AtCoder Regular Contest 162

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

ARC152

## ARC152 小偷一个懒🙃 ### A 贪心地放即可 ```cpp #include using namespace std; const int MAXN=2e5+5; int n; int a[MAXN],L; signed main() { // freopen("date.in"," ......
ARC 152

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

【杂题乱写】ARC111

## [AtCoder-111A Simple Math 2](https://atcoder.jp/contests/arc111/tasks/arc111_a) $N$ 比较大,考虑倍增处理,设 $f(N)=\left\lfloor\frac{10^N}{M}\right\rfloor\bmod ......
ARC 111

【杂题乱写】ARC110

## [AtCoder-ARC110A Redundant Redundancy](https://atcoder.jp/contests/arc110/tasks/arc110_a) 答案是 $\operatorname{lcm}_{i=1}^n i +1$,只需要在 $p^k$ 位置乘上一个 $ ......
ARC 110

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

题解:【ARC032C】 仕事計画

[题目链接](https://www.luogu.com.cn/problem/AT_arc032_3) 只和区间相对位置有关,先离散化。时间点上倒序贪心,设 $f_i$ 表示第 $i$ 个时间点最多能选几个区间,$g_i$ 表示在最大 $f_i$ 的前提下转移过来最小的字典序标号,可以顺便记录前驱 ......
题解 032C ARC 032

[ARC105F] Lights Out on Connected Graph

前置芝士:[[ABC213G] Connectivity 2](https://www.cnblogs.com/adam01/p/17681390.html) #### 题目大意 给你一张 $n$ 个点 $m$ 条边的图,求有多少种删边方法使得删完后的图是一张联通二分图。 $n\le 17,m\le ......
Connected Lights Graph 105F ARC

Xcode & cocoapods错误:File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a解决方法

问题描述: 引入了一个新的cocoapods依赖之后,启动运行,显示Fail,报错File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/li ......

ARC153

## ARC153 ### A 直接枚举所有的美丽数即可 ```cpp #include using namespace std; vectorV; signed main() { // freopen("date.in","r",stdin); // freopen("date.out","w", ......
ARC 153

【题解】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

AtCoder Beginner Contest 201 E - Xor Distances

# E - Xor Distances [原题链接](https://atcoder.jp/contests/abc201/tasks/abc201_e) 题意:设dist(i,j)即i到j之间路径的异或和,求树上所有两点之间dist(i,j)的和 思路:dist(i,j) = dist(i,1)^ ......
Distances Beginner AtCoder Contest 201

AtCoder Beginner Contest 201 D - Game in Momotetsu World

# D - Game in Momotetsu World [原题链接](https://atcoder.jp/contests/abc201/tasks/abc201_d) 题意 有一个 H×W 的方格,每个方格里写着 '+' 或 '-' 有一个初始在 (1,1),(也就是左上角)的棋子, Tak ......
Momotetsu Beginner AtCoder Contest World

AtCoder Beginner Contest 317 D - President

# D - President [原题链接](https://atcoder.jp/contests/abc317/tasks/abc317_d) 题意:一共n轮,每一轮Xi > Yi (票数)时,X可以获得Zi 张席位,反之亦然;最终席位总和多的就获胜;因此要使X获胜,求Y至少要给X多少个票 思路 ......
President Beginner AtCoder Contest 317

AtCoder Beginner Contest 317 C - Remembering the Days

# C - Remembering the Days [原题链接](https://atcoder.jp/contests/abc317/tasks/abc317_c) 题意:每个点最多经过一次,求最长路 思路:数据范围很小,深搜每个点能到其他点的所有路,取最大 ```c++ #include us ......
Remembering Beginner AtCoder Contest Days

AtCoder Beginner Contest 317

# A - Potions ```cpp #include using namespace std; #define int long long int power(int x, int y, int p) { x %= p; int ans = 1; while (y) { if (y & 1) ......
Beginner AtCoder Contest 317

AtCoder Beginner Contest 296 C - Gap Existence

# C - Gap Existence [原题链接](https://atcoder.jp/contests/abc296/tasks/abc296_c) 题意:是否存在Ai - Aj = x 思路:排序,双指针 ```c++ #include using namespace std; const ......
Existence Beginner AtCoder Contest 296

AtCoder Beginner Contest 292 E - Transitivity

# E - Transitivity [原题链接](https://atcoder.jp/contests/abc292/tasks/abc292_e) 题意:对于一个有向图,进行加边操作,使最终任意的个点具有传递效果,即若a到b有边,b到c有边,那么a到c也要有边,问最少需要进行多少次操作,使得每 ......
Transitivity Beginner AtCoder Contest 292

AtCoder Beginner Contest 292 D - Unicyclic Components

# D - Unicyclic Components [原题链接](https://atcoder.jp/contests/abc292/tasks/abc292_d) 题意:判断一个连通块的边和点个数是否相同 思路:对它使用并查集吧 点击查看代码 ``` #include using namesp ......

[ARC100E] Or Plus Max

[原题链接](https://atcoder.jp/contests/arc100/tasks/arc100_c) 不难发现我们可以处理出每个状态所有子集中 $a_i$ 的最大值和次大值,用一个 `pair` 维护,跑一遍 $\text{SOSDP}$,这时每个状态的权值就是最大值加次大值,最终输出 ......
100E Plus ARC 100 Max