-
You are given an integer sequence a_0, a_1, ..., a_{N-1} in order. Process the following Q queries:
- `i, x`: set `a_i
-
同じ有理数を 2 回以上質問する場合があります。
3 -> 0 , 4 -> 0 の遷移の間違いが原因です。
https://github.com/NachiaVivias/cp-library/blob/4d814fc3c2ed6555719399d9a5be7e41add1cff5/Cpp/Include/nachia/math/rational-number-search.hpp…
-
初 open issue です
問題ID: k_shortest_simple_path
問題名: K Shortest Simple Path
想定アルゴリズム: Yen's Algorithm
参考資料: https://yukicoder.me/problems/no/1069
# 問題概要
N 頂点 M 辺重み付き有向グラフが与えられるので、s -> t の path …
-
-
reported in discord https://discord.com/channels/1087310259447681114/1098365529217061014/1208898310321086574
-
問題名: Primarity Test
## 問題
$Q$ クエリ
整数 $N$ が与えられるので、素数なら `YES`、そうでないなら `NO` と出力
## 制約
$1 \leq Q \leq 100,000$
$1 \leq N \leq 10^{18}$
-
Problem name: Vertex Add Range Contour Max on Tree
## Problem
Given a tree with N vertices, where the i-th edge connects vertices ui and vi. Value ai is written on the vertex i. Process the f…
-
Problem name: Range Add Range Sum
## Remarks
I found what appears to actually, as surprising as it may be, be a bug in the AtCoder `lazysegtree` library, for which I filed https://github.com/atc…
-
問題名: Range Unionfind (?)
## 問題
N 頂点の無向グラフがある。最初辺はない。Q クエリ処理
1 L R D: (L,R), (L+1,R+1), ..., (L+D-1,R+D-1) にそれぞれ無向辺を追加。多重辺ができることもある。
2 U V: 頂点 U, V が連結かどうか答える (Yes/No)
## 解法
各連結成分に代表の頂点を定める…
-
Додати структуру з операціями додавання, віднімання, ділення націло, взяття за модулем. Тоді C++ сам зможе рахувати gcd.