A few weeks back I had the opportunity to attend the ICPC Asia West Continent Finals 2023 along with my teammates VS-Codes and om_mittal7, where we encountered the following problems as part of the contest problemset. We weren't able to solve E in contest, and that kept bugging me for...
在刚刚结束的第43届ACM国际大学生程序设计竞赛亚洲区总决赛(Asia-East Continent Final)中,由中山大学数据科学与计算机学院的三名本科生组成的队伍,在郭嵩山老师的带领下,获得了学校亚军,同时获得了2019年参加第43届在葡萄牙举行的国际大学生程序设计竞赛全球总决赛资格。 据悉,该赛事吸引了全国380余支队伍,180多所高校...
Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - solve these problems in the archive. If you just want to solve...
链接:2021 ICPC Asia East Continent Final A.DFS Order 以1为根求树上每个点的最小 dfs 序和最大 dfs 序,一个点的最小 dfs 序是该点深度,用cnti表示以i这个点为根的树上点的个数,一个点的最大 dfs 序是n+1−cnti。 时间复杂度O(∑n) #include"bits/stdc++.h"usingnamespacestd;usingi64=lo...
很炫酷的题。 整个图的结构是基环树。不妨假设s在环上,考虑变换,一定是环上连续一段0一段1变换,然后随着环上01变换,每次染到环上某个点时都可以往子树内然一段,于是子树里也会变成01分层的情况。 子树里如果01分成了最多k次,那么环上至少01变换k次。首先可以把子树部分的代价 DP 出来,即设f(u,i)表示...
The 2022 ICPC Asia-East Continent Final参赛名额公示 公告来自 2022 ICPC中国区网络预选赛 快给朋友分享一下吧!关于赛氪 了解赛氪 成为校园合伙人 加入我们 服务协议 新闻报道 帮助中心 常见问题 社区规范 产品介绍 增值服务 在线客服 官方客服微信: (工作时间:工作日 10:00-19:00) 商务合作 商务经理...
#include <bits/stdc++.h> using namespace std; using i32 = int32_t; using i64 = long long; #define int i64 using vi = vector<int>; void solve() { int n = 32; vi a(n); for (auto &i: a) cin >> i; int cnt = 0; for (int i = 1; i < n; i++) cnt += a[0...
The 2024 ICPC Asia East Continent Online Contest (I) L. Bull Farm(建模,缩点)考虑空位的移动,合法的按钮只有两种:要么是排列,要么只有两个数相同。对于前者,空位只能沿着排列移动,对于后者,是 x\to a…
简介:2019 ICPC Asia-East Continent Final(A,M)题解 A. 题意就是输入n,m,代表行含n格,列含m格,让我们在这个网格里面找线段,要求线段中点是交叉点;求有几个线段。 题解; 我们可以分析知道,把每一行每一列的含有合法的线段找出来,然后找出类似2*2,4*4的正方形的所有个数*2; ...
For each test case, the first line contains an integer n (1≤n≤105). The next line contains a string of length n. The ii-th character of the string is 1 if c[i] isnonzeroand 0 otherwise. It is guaranteed that the sum of nn over all test cases is no more than 106106. ...