比赛链接:The 2023 ICPC Asia Macau Regional Contest (The 2nd Universal Cup. Stage 15: Macau) 这场真太逆天了,被狠狠俘虏,先放写了的三题 A 首先假设-1全选,删掉一个-1对行、列和贡献为1,其余位置填一个一对和的贡献也为1。按行考虑,贪心的从离目标差最多的列开始填/删。 I 分两个周期考虑,枚举...
历史上的今天: 2023-03-02 Codeforces Round #850 (Div. 2, based on VK Cup 2022 - Final Round) MENU The 2023 ICPC Asia Macau Regional Contest (The 2nd Universal Cup. Stage 15: Macau) 发表于 2024-03-02 20:15阅读次数:2153评论次数:0Codeforces比赛 [...
#include <bits/stdc++.h> using namespace std; using i32 = int32_t; using i64 = long long; #define int i64 using vi = vector<int>; using pii = pair<int, int>; const i32 inf = INT_MAX / 2; void solve() { int a, b, m; cin >> a >> b >> m; int t1 = b, v1 ...
The 2020 ICPC Asia Macau Regional Contest 题解,A-Accelerator设加速器序列为\(a_1,a_2,\cdots,a_n\),那么考虑把题目里的式子展开:\(a_n+a_na_{n-1}+a_na_{n-1}a_{n-2}+\cdots+\prod_{i=1}^na_i\)。我们把它一项项考虑。对于第\(k\)项...
#include <bits/stdc++.h> #define int long long const int N = 2e5 + 10; int c[N], v[N]; int pre[N], nxt[N], last[N], his[N]; namespace SegmentTree{ int tree[N << 2], maxx[N << 2]; #define lson rt << 1, l, mid #define rson rt << 1 | 1, mid + 1, ...
首先感谢教练,感谢队友,他们前后费尽周折取得了我们队ecfinal的资格,而我本人几乎没有出任何力,十分惭愧,这样大概是不配被称为acmer的吧 多亏了他们捞我一把才有了这次参赛机会 游记 按照shadowice的话说,所谓出道战即是ecfinal,也算是一种资本了,我苦笑 ...
Assigning stations to departments is not your job; However, since you are probably the only responsible person left in ICPC, you want to make sure it is at least possible. Give a network proposal that satisfies all the restrictions above, or determine it is impossible. ...
The 2021 ICPC Asia Macau Regional Contest 目录 写在前面 A K F C G I 写在最后写在前面比赛地址:https://codeforces.com/gym/104373当了一场口胡选手。我是彩笔。以下按个人向难度排序。A随便找条路径,检查路径是否满足条件,满足则直接输出,否则倒序输出。
D - Shortest Common Non-Subsequence 题意 给你两个子串找到一个最短没有出现过的子序列并且字典序最小 分析 序列自动机 nxt[i][j] 代表第i个位置 第j个字符的位置 nxta[lena+1][0]=nxta[lena+1][1]=lena+1; nxtb[lenb+1][0]=nxtb[lenb+1][1]=lenb+1; ...
代码: /** * ┏┓ ┏┓ * ┏┛┗━━━┛┗━━━┓ * ┃ ┃ * ┃ ━ ┃ * ┃ > < ┃ * ┃ ┃ * ┃... ⌒ ... ┃ * ┃ ┃ * ┗━┓ ┏━┛ * ┃ ┃ Code is far away from bug with the animal protecting * ┃ ┃...