This contest is one of the qualifying contests for AtCoder World Tour Finals 2026 to crown the world champion of AtCoder players. Please refer to this post for more details. After the contest ends, all participants can post their approach on the Editorial tab. Please share your approach. We...
AtCoder Heuristic Contest (AHC) is a new series of programming contests that will be held regularly on AtCoder. Unlike algorithm contests such as ABC/ARC/AGC, the goal is to create a better solution to a problem for which it is difficult to find the optimal solution. We are planning to ...
using namespacestd;intn;chara[MAXN]; ll sum[MAXN],f[MAXN],sum2[MAXN],ans; llpoww(ll x ,inty){ ll zz =1;while(y){if(y &1)zz = (zz * x) % mod; x = (x * x) % mod; y = y >>1; }returnzz; }intmain(){scanf("%s", a +1); n =strlen(a +1);for(inti =...
Currently, there is no one in line at the ticket booth, and N people will come to buy tickets one after another. Specifically, the i-th person will arrive at the ticket booth Ti seconds from now. If there is already a line, they will join the end of it; if not, they will start...
思路感觉很对,但是他代码交。wa在了 after_contest_01.txt, 大概就是被hack了。想了半天感觉没什么问题啊,不知道为什么wa了。 经过几番研究 ,终于发现了 坑点,感谢网友提供的数据: 7 5 35 25 5 -25 -25 -25 -25 答案应该是13671875 所以 这里的坑点就是 当能凑到正数情况 且当k为奇数时 先取正数最...
AtCoder Beginner Contest 318 blackbird 来自专栏 · 算法竞赛题解 2 人赞同了该文章 A - Full Moon Problem Statement Takahashi likes full moons. Let today be day 1 . The first day on or after today on which he can see a full moon is day M . After that, he can see a full moon ever...
AtCoder Beginner Contest 151的数学推导难不难? 组合数在AtCoder Beginner Contest 151中怎么运用? AtCoder Beginner Contest 151有哪些数论相关的题? 思路统计最大值出现的次数,和最小值出现的次数。虽然是每次都是MAX-MIN,我们先求MAX的和,然后再求MIN的和,做差。 这次代码写的真的很漂亮 题目地址: 代码语言...
The i-th person will push the switch ti seconds after the first person pushes it.How long will the shower emit water in total?题目大意给出一堆线段,问覆盖的长度是多少,升序O(n)扫一遍就好了代码#include <bits/stdc++.h> using namespace std; int n,t; int f[200010]; long long ans; ...
Decades have passed since the beginning of AtCoder Beginner Contest. The contests are labeled as ABC001, ABC002, … from the first round, but after the 999-th round ABC999, a problem occurred: how the future rounds should be labeled? In the end, the labels for the rounds from the 1000...
after days from the day you do it. You can take and complete at most one of these jobs in a day. However, you cannot retake a job that you have already done. Find the maximum total reward that you can earn no later than days from today. ...