regional central contest europe

AtCoder Beginner Contest 323

A - Weak Beats #include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; using vi = vector<int>; int main() { ios::sync_with_stdio(fal ......
Beginner AtCoder Contest 323

Toyota Programming Contest 2023#7(AtCoder Beginner Contest 328)

Toyota Programming Contest 2023#7(AtCoder Beginner Contest 328) A. Not Too Hard 题意: 将给定的数列\(a\)中数值小于\(x\)的数累加。 解题思路: 模拟。 代码: #include<bits/stdc++.h> u ......
Contest Programming Beginner AtCoder Toyota

AtCoder Beginner Contest 328 (ABC328)

A. Not Too Hard 模拟。 Code B. 11/11 模拟。 Code C. Consecutive Description 给你一个字符串 \(S\),有 \(Q\) 次询问,每次输入 \(l, r\),求:\([S_l,S_r]\) 区间中有多少个相邻的字符是相等的。 Soluti ......
328 Beginner AtCoder Contest ABC

Kattis - Add or Multiply (Rocky Mountain Regional Contest 2023)

Intro Given a math expression with + or * sign with single digit numbers (1 to 9). Support the following operations: Swap 2 number and evaluate the wh ......
Multiply Mountain Regional Contest Kattis

AtCoder Beginner Contest 328

AtCoder Beginner Contest 328) A - Not Too Hard 扫一遍求和。 B - 11/11 枚举,判断。 C - Consecutive 对于相等的 \(a_i=1\), 做一遍前缀和。 D - Take ABC 用一个栈维护即可。 E - Modulo MST ......
Beginner AtCoder Contest 328

AtCoder Beginner Contest 328

A - Not Too Hard (abc328 A) 题目大意 给定\(n\)个数字和一个数 \(x\)。 问不大于 \(x\)的数的和。 解题思路 按找要求累计符合条件的数的和即可。 神奇的代码 #include <bits/stdc++.h> using namespace std; usin ......
Beginner AtCoder Contest 328

AtCoder Beginner Contest 328

A 傻逼题。 B 傻逼题 C 傻逼题 D 不难发现,每次添加一个字符,如果可以当前的答案组成 ABC 就删。然后模拟即可。 E 两种方法。 二进制枚举使用了哪些边。 可以发现有用的状态只有 \(\binom{m}{n-1}\),上限大概 \(10^5\),剩余无用状态过了就行。复杂度 \(O(m2^ ......
Beginner AtCoder Contest 328

The 2023 ICPC Nanjing Regional Contest G,F

G. 背包 我们要是选一个集合出来 并且免除k个宝石的话 我们一定是选最贵的k个宝石免费 这样我们的做法就是对wi排序 然后前面的做背包 后面直接贪心选vi最大的k个 这样是一定包含了最优解的 当然你可以用二分bit 也可以直接维护另一个dp int n,tr1[200010],tr2[200010 ......
Regional Contest Nanjing 2023 ICPC

Kattis - A Complex Problem (The 2023 ICPC Rocky Mountain Regional Contest)

Intro This was one of the problems I didn't do during the regional contest. One of my teammates solved it. Observation There are few things to note. F ......
Mountain Regional Complex Contest Problem

AtCoder Beginner Contest(abc) 322

B - Prefix and Suffix 难度: ⭐ 题目大意 给定两个字符串t和s, 如果t是s的前缀则输出1, 如果是后缀则输出2, 如果都是则输出0, 都不是则输出3; 解题思路 暴力即可; 神秘代码 #include<bits/stdc++.h> #define int l1ng l1ng ......
Beginner AtCoder Contest 322 abc

The 10th Jimei University Programming Contest

外校打星队伍,排名22/450,还算凑合吧。 A. A+B问题 直接枚举进制 #include <bits/stdc++.h> using namespace std; using vi = vector<int>; void solve() { string str; vi a, b, s; ci ......
Programming University Contest Jimei The

Atcoder Beginner Contest 321 G - Electric Circuit 题解 - 状压dp | 指定最低位

为了更好的阅读体验,请点击这里 题目链接:G - Electric Circuit 看到了 \(N\) 的数据范围,因此是显然的状压 dp。 不妨设 \(f_S\) 为仅使用 \(S\) 集合中的所有点,能够连成恰好 \(1\) 个连通块的方案数。\(g_S\) 为仅使用 \(S\) 集合中的所有点 ......
题解 Beginner Electric Atcoder Contest

AtCoder Beginner Contest(abc) 321

B - Cutoff 难度: ⭐⭐ 题目大意 一场考试有n门成绩, 最终成绩是减去最大值和最小值后的和; 现在给出n-1门成绩, 问最后一门成绩最少为多少可以让总成绩大于等于m; 解题思路 列举第n门成绩由小到大时其他成绩所要满足的条件即可; 神秘代码 #include<bits/stdc++.h> ......
Beginner AtCoder Contest 321 abc

[题解] P5901 [IOI2009] Regions

P5901 [IOI2009] Regions 给你一棵树,每个点有颜色 \(h_i\)。 多次询问,每次询问有多少对 \((u, v)\) 满足 \(u\) 是 \(v\) 的祖先且 \(u\) 的颜色是 \(r_1\) 且 \(v\) 的颜色是 \(r_2\)。 \(n, q \le 2 \ti ......
题解 Regions P5901 5901 2009

2017 China Collegiate Programming Contest Final (CCPC-Final 2017)

目录写在前面EACKJGI写在最后 写在前面 比赛地址:https://codeforces.com/gym/104207。 以下按照个人向难度排序。 妈的怎么感觉有八十万件杂七杂八的事要做。 受不了了,真想直接消失。 这比大学是一秒也不想上了。 E 签到题,看都没看。 code by dztlb: ......
Final 2017 Programming CCPC-Final Collegiate

The 2021 ICPC Asia Macau Regional Contest

https://codeforces.com/gym/104373 A. So I’ll Max Out My Constructive Algorithm Skills 随便选一条路径,若不合法则 reverse 即可。 E. Pass the Ball! 大小相等的置换环显然可以合并,大小不同的 ......
Regional Contest Macau 2021 ICPC

AtCoder Beginner Contest(abc) 320

B - Longest Palindrome 难度: ⭐ 题目大意 找一个字符串中最长的回文子串 解题思路 数据不大, 暴力即可; 神秘代码 #include<bits/stdc++.h> #define int long long #define IOS ios::sync_with_stdio( ......
Beginner AtCoder Contest 320 abc

AtCoder Beginner Contest 327

A - ab #include<bits/stdc++.h> using namespace std; #define mp make_pair #define int long long using vi = vector<int>; using pii = pair<int, int>; con ......
Beginner AtCoder Contest 327

AtCoder Beginner Contest(abc) 319

B - Measure 难度: ⭐ 题目大意 给定一个数N, 我们要求输出长度为n+1的一个序列Si(i从0到n), 对于Si, 如果存在j(j从1~9)是N的一个除数, 并且i是N/j的一个倍数, 那么Si就是满足条件的最小的j, 如果没存在就输出'-'; 解题思路 数据不大, 暴力即可; 神秘代 ......
Beginner AtCoder Contest 319 abc

AtCoder Beginner Contest 327 (ABC327)

A. ab 直接根据题意模拟即可。 Code B. A^A 直接枚举 \(i= 1, 2,\dots, 15\),每次看看 \(i ^ i\) 是否等于 \(A\) 即可。 Code C. Number Place Description 给你一个 \(9 \times 9\) 的矩阵 \(A\), ......
327 Beginner AtCoder Contest ABC

AtCoder Beginner Contest 327

A - ab 题意:判断字符串中是否有“ab”或者是“ba“ #include<bits/stdc++.h> using namespace std; void solve(){ int n; cin>>n; string s; cin>>s; if(s.find("ab")!=s.npos||s. ......
Beginner AtCoder Contest 327

AtCoder Beginner Contest(abc) 318

B - Overlapping sheets 难度: ⭐ 题目大意 在一个坐标系中给出覆盖多个矩形, 问最后所有矩形覆盖的总面积是多少; 解题思路 坐标系的范围不大, 标记后遍历即可; 还是要注意给的是坐标系的点, 计算的是边; 神秘代码 #include<bits/stdc++.h> #defin ......
Beginner AtCoder Contest 318 abc

AtCoder Beginner Contest(abc) 327

B - A^A 难度: ⭐ 题目大意 给出一个数n, 问是否存在一个数m, 使mm = n; 解题思路 因为n的数据范围很大, 到1e18, 经过打表可以发现, 当m=16时就已经大于1e18了, 因为数很多所以用了__int128, 因为double会损失精度; 神秘代码 #include<bit ......
Beginner AtCoder Contest 327 abc

AtCoder Beginner Contest(abc) 317

B - MissingNo. 难度: ⭐ 题目大意 给定n个数, 这n个数中最小值到最大值之间缺一个数, 输出这个数; 解题思路 数据不大, 暴力即可; 神秘代码 #include<bits/stdc++.h> #define int long long #define IOS ios::sync_ ......
Beginner AtCoder Contest 317 abc

Japan Registry Services (JPRS) Programming Contest 2023 (AtCoder Beginner Contest 324) 赛后总结

Japan Registry Services (JPRS) Programming Contest 2023 (AtCoder Beginner Contest 324) 赛后总结 可悲的是:我没来得及写题解。 Task A Same 秒切。 直接输入排一遍序再遍历即可。 #include <bi ......

HHKB Programming Contest 2023(AtCoder Beginner Contest 327) 赛后总结

HHKB Programming Contest 2023(AtCoder Beginner Contest 327) 赛后总结 又没来得及写题解。。。 赛时 A - ab 查找 ab 和 ba,只要其中一者存在就行。 #include <bits/stdc++.h> using namespace ......
Contest Programming Beginner AtCoder HHKB

HHKB Programming Contest 2023(AtCoder Beginner Contest 327)

HHKB Programming Contest 2023(AtCoder Beginner Contest 327) A - ab int main() { IOS; string s; cin >> n >> s; bool f = false; for (int i = 1; i < n; + ......
Contest Programming Beginner AtCoder HHKB

HHKB Programming Contest 2023(AtCoder Beginner Contest 327)

HHKB Programming Contest 2023(AtCoder Beginner Contest 327) A. ab 解题思路: 模拟即可。 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; ......
Contest Programming Beginner AtCoder HHKB

AtCoder Beginner Contest 327

A - ab (abc327 A) 题目大意 给定一个字符串\(s\),问是否包含 ab或ba。 解题思路 遍历判断即可。 神奇的代码 #include <bits/stdc++.h> using namespace std; using LL = long long; int main(void) ......
Beginner AtCoder Contest 327

Atcoder Grand Contest 016

给我贺完了? A - Shrinking 给定一个串 \(s\),每次可以进行如下操作: 记串长为 \(n\). 构造长为 \(n-1\) 的串 \(s'\),满足 \(s'_i\) 为 \(s_i\) 或 \(s_{i+1}\),令 \(s\leftarrow s'\). 问使 \(s\) 中所有 ......
Atcoder Contest Grand 016