problems atcoder regular contest

AtCoder World Tour 2022 B The Greatest Two

原题面:https://atcoder.jp/contests/wtf22-day2/tasks/wtf22_day2_b 题面翻译: 一个长度为 \(n\) 的排列 \(p\),每次可以把一个长 \(k\) 区间的最大与次大值交换,问操作任意次数后可以得到的排列数量对 \(998244353\) ......
Greatest AtCoder World 2022 Tour

2021-2022 ICPC Northwestern European Regional Programming Contest (NWERC 2021)

Preface 和昨天刚好相反,前期极度崩盘2h2题而且一堆银铜牌题不会 但好在后面稳扎稳打慢慢追回来了一点,最后超高罚时8题收场 这场一边打一边看ECF的实况,最后看到同校的Wifi暴打全场,实在是ORZ A. Access Denied 签到,首先暴力问出长度然后从前往后一位一位确定即可 注意实 ......

AtCoder Beginner Contest 335 G Discrete Logarithm Problems

洛谷传送门 AtCoder 传送门 考虑若我们对于每个 \(a_i\) 求出来了使得 \(g^{b_i} \equiv a_i \pmod P\) 的 \(b_i\)(其中 \(g\) 为 \(P\) 的原根),那么 \(a_i^k \equiv a_j \pmod P\) 等价于 \(kb_i \ ......
Logarithm Beginner Discrete Problems AtCoder

2023 United Kingdom and Ireland Programming Contest (UKIEPC 2023)

Preface 最坐牢的一集,前3h狂出10题然后最后2h坐牢,祁神写J怒调2h最后喜提MLE 赛后我Rush了个H的做法常数太大又喜提TLE,评价是不如去写E题的模拟退火 A. Assessment Disruption 挺精巧的构造题,刚开始以为是构造数据不卡掉想歪了好久,后面仔细一想还是挺简单 ......
2023 Programming Kingdom Ireland Contest

2022 Jiangsu Collegiate Programming Contest

A. PENTA KILL! 简单模拟。 B. Prime Ring Plus 大于 \(2\) 的素数只可能是奇数,因此相邻两个数一定是一奇一偶,容易想到二分图。 但是环上每个点有两个相邻的点,网络流求匹配是将与源汇点相连的边流量设为 \(2\) 即可。 C. Jump and Treasure ......
Programming Collegiate Jiangsu Contest 2022

基于正则化的图自编码器在推荐算法中的应用 Application of graph auto-encoders based on regularization in recommendation algorithms

引言 看过的每一篇文章,都是对自己的提高。不积跬步无以至千里,不积小流无以成江海,积少成多,做更好的自己。 本文基于2023年4月6日发表于SCIPEERJ COMPUTER SCIENCE(PEERJ计算机科学)上的一篇名为《基于正则化的图自编码器在推荐算法中的应用》(Application of ......

AtCoder Regular Contest 138

比赛链接 A - Larger Score 将一个 \(i\) 交换出前 \(K\) 个并将一个 \(j\) 交换进前 \(K\) 个需要的次数是 \(j-i\)。 于是只需要对于每个 \(j>K\) 找最大的 \(i\le K\) 使得 \(A_i<A_j\)。 B - 01 Generation ......
AtCoder Regular Contest 138

2020-2021 ACM-ICPC, Asia Seoul Regional Contest

Preface 这几天里打的最好的一场了,虽然后面写I唐的不行浪费了好多时间 但好在最后都改出来了并且最后Rush出了L题,4h57min绝杀,9题收场 只能说恰好在祁神缺席的这场没有几何,没有被腐乳 而且这场打完发现只有韩文题解没有英文题解,这下直接不用补题了爽歪歪 A. Autonomous V ......
ACM-ICPC Regional Contest Seoul 2020

2021 Jiangsu Collegiate Programming Contest

A. Spring Couplets 简单模拟。 B. Among us 容易想到对于每个内鬼和船员集合 \(S\),求出它杀掉 \(S\) 中所有人的最短时间,最后 \(O(2^k)\) 合并答案即可。 考虑状压。设 \(f_{S,i}\) 杀完 \(S\) 中的人后站在节点 \(i\) 上所需要 ......
Programming Collegiate Jiangsu Contest 2021

CF1006E Military Problem 题解

CF1006E Military Problem 题解 题意 给定一颗有 \(n \thinspace (2 \leq n \leq 2 \times 10^5)\) 个节点的树,树根为 \(1\)。 对于每个节点 \(i \thinspace (2 \leq i \leq n)\) 都有它的父节点 ......
题解 Military Problem 1006E 1006

AtCoder Beginner Contest 335 (Sponsored by Mynavi)

AtCoder Beginner Contest 335 (Sponsored by Mynavi) A - 2023 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<l ......
Sponsored Beginner AtCoder Contest Mynavi

P4137 Rmq Problem / mex

题意 给定一个长度为 \(n\) 的数组。 \(q\) 次询问,每次询问区间 \(mex\)。 Sol 考虑主席树维护区间 \(mex\)。 不难发现可以考虑维护当前所有点的最后出现的下标。 直接套板子即可。 Code #include <iostream> #include <algorithm> ......
Problem P4137 4137 Rmq mex

gurobipy: Gurobi Optimizer is a mathematical optimization software library for solving mixed-integer linear and quadratic optimization problems

Project description The Gurobi Optimizer is a mathematical optimization software library for solving mixed-integer linear and quadratic optimization p ......

2023-2024 ACM-ICPC Latin American Regional Programming Contest

Preface 这场终于找回一点感觉了,总体来说虽然有点唐但打的还不错 开场签到有点磕磕绊绊在加上前面只有我一个人在读题,因此出的比较慢 中期开始慢慢发力后祁神也放下了明天的数电考试复习过来助阵,轻松秒了一道几何 最后已经写了一个细节题L的徐神最后1h被另一个细节题G搞得屡次破防,最后也是没能调出, ......

http://www.nfls.com.cn:20035/contest/1878/problem/5

http://www.nfls.com.cn:20035/submission/781868 #include<bits/stdc++.h> using namespace std; int N, ct[45], b[25], ans, a[45][5]; void dfs(int t, int s ......
contest problem 20035 http 1878

AtCoder Beginner Contest 335 总结

ABC335总结 A.202<s>3</s> 翻译 给你一个由小写英文字母和数字组成的字符串 \(S\)。 \(S\) 保证以 2023 结尾。 将 \(S\) 的最后一个字符改为 4,并打印修改后的字符串。 分析 两种做法: 直接把最后一个字符改为4,然后输出。 输出前 \(n\) 个字符后输出4 ......
Beginner AtCoder Contest 335

2023-2024 ICPC Central Europe Regional Contest (CERC 23)

Preface 新年第一训,直接被干出shi来 开局经典梦游2h2题不知道在干啥,后面抄个网络流板子也能抄错卡个半天 后面2h祁神来救场几何,结果因为一个特判地方没加绝对值WA到结束都没看出来 鉴定为全队太久没摸键盘导致的,寒假有时间得再多练练的说 A. Attendance 开场就开到的不可做题 ......
Regional Central Contest Europe 2023

AtCoder Beginner Contest 335

A #include<bits/stdc++.h> using namespace std; void solve(){ string s; cin>>s; for(int i=0;i<s.size()-1;i++){ cout<<s[i]; } cout<<"4"; } int main(){ i ......
Beginner AtCoder Contest 335

CF1917D Yet Another Inversions Problem 题解

官方题解。 思路 首先可以把 \(a\) 数组分成 \(n\) 块,每块都是长为 \(k\) 的 \(q\) 数组。于是我们可以把答案拆成两部分计算:块内的贡献和块外的贡献。对于块内,\(p_i\) 都是一样的,因此可以直接消去,计算的实际上就是 \(q\) 序列的逆序对数,把这个值 \(\time ......
题解 Inversions Another Problem 1917D

Atcoder Xmas Contest 2022 H - Happy Game

Atcoder Xmas Contest 2022 H - Happy Game H - Happy Game (atcoder.jp) 没找到英文题解的一道题,或许很冷门。神秘。 Problem 给一张简单无向联通图,初始所有点都为白点。A 可以选择一个点,将其染黑;之后每次操作 B 可以选择最多 ......
Atcoder Contest Happy 2022 Xmas

AtCoder Beginner Contest 335

AtCoder Beginner Contest 335 康复训练 打的有点昏啊 A - 2023 #include <bits/stdc++.h> #define endl '\n' //#define int long long using namespace std; void solve() ......
Beginner AtCoder Contest 335

AtCoder_abc335

A、2023 跳转原题点击此:A题地址 1、题目大意 给你一个字符串,要你对该字符串的最后一个字符改为4。 2、题目解析 直接通过string的性质即可,直接更改string的最后一个字符即可。 3、具体代码 #include<bits/stdc++.h> using namespace std; ......
AtCoder_abc AtCoder 335 abc

AtCoder Beginner Contest 335

基本情况 ABD秒了,C卡了一会,空间换时间然后爆内存,最后交了个100多行的逆天模拟终于+4过。 赛后发现其实是手写了双端队列。 C - Loong Tracking C - Loong Tracking 思路很明显,空间换时间,把每个状态用数组全记录下来。 但是纯这样写数组会开的巨大,所以得让后 ......
Beginner AtCoder Contest 335

The Biggest Water Problem

地址 #include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin>>n; ll sum=0; while(n>10){ ll sum=n; ll d=0; while(sum){ ......
Biggest Problem Water The

curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?)

curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?) 最近遇到了一个这个问题 发现是因为自己加了一个这个 curl_easy_setopt(pCURL, CURLOPT_SSL_OPTIONS, ......

FreeBSD “su: Sorry” Problem

Solving the FreeBSD “su: Sorry” Problem The solution is to restart FreeBSD in single user mode and then make the change as root. This can be done by f ......
FreeBSD Problem Sorry su

洛谷 P9061 [Ynoi2002] Optimal Ordered Problem Solver

洛谷传送门 QOJ 传送门 考虑操作了若干次,所有点一定分布在一个自左上到右下的阶梯上或者在这个阶梯的右(上)侧。此处借用 H_W_Y 的一张图: 考虑如何计算答案。对于一次询问 \((X, Y)\),如果它在阶梯左下方不用管它,否则考虑容斥,答案即为 \(x \ge X, y \ge Y\) 的点 ......
Optimal Ordered Problem Solver P9061

CF1910I Inverse Problems

题目链接:https://codeforces.com/contest/1910/problem/I 题意 有一个 \(n\) 个字符的字符串 \(S\),你需要不断从中删除一个长度为 \(k\) 的子串,直到串的长度变为 \(n \mathbin{\rm mod} k\),求能够产生的字典序最小的 ......
Problems Inverse 1910I 1910 CF

Codeforces 1909I - Short Permutation Problem

介绍一下 k 老师教我的容斥做法。 考虑固定 \(m\) 对所有 \(k\) 求答案。先考虑 \(k=n-1\) 怎么做。我们将所有元素按照 \(\min(i,m-i)\) 为第一关键字,\(-i\) 为第二关键字从小到大插入,即按照 \(n,n-1,n-2,\cdots,m+1,m,1,m-1,2 ......
Permutation Codeforces Problem 1909I Short

D. Mathematical Problem

原题链接 题解链接 code #include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { int n; cin>>n; if(n==1) { puts("1"); continue; } ......
Mathematical Problem
共2000篇  :1/67页 首页上一页1下一页尾页