} B - Japanese Cursed Doll (abc363 B) 题目大意 给定nn个人的头发长度,每天会涨11厘米。问至少经过多少天,有至少PP个人的头发长度至少是TT。 解题思路 由于头发都是一起涨的,将头发长度从长到短排序,当第PP个人的头发涨到TT时,前P−1P−1个也至少是TT了。所以答案就是第PP个人的头发涨到TT的时间。
ABC363 C - Avoid K Palindrome 2题目传送门分析统计字母出现次数搜索方案数即可代码cpp #include <iostream> #include <string> #include <algorithm> using namespace std; string str,Str; int c[26],n,k,ans; void dfs(int dep){ if (dep==n){ for (int i=0;i<=n-k;++i){ int cnt=0; ...
0,-1,0},dy[]={0,1,0,-1};inta[N][N];inth,w,t;boolst[N][N];structnode{inth,x,y;booloperator>(constnode&X)const{returnh>X.h;}};boolcheck(intx,inty){returnx>=1&&x<=h&&y>=1&&y<=w;}intmain(){cin>>h>>w>>t;for(inti=1;i<=h;++i){for(intj...
We will hold AtCoder Beginner Contest 363.Contest URL: https://atcoder.jp/contests/abc363Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20240720T2100&p1=248Duration: 100 minutesWriter: Nyaan, math957963, physics0523Tester: MtSaka, Aotsuki...
本题只要删掉k个数(固定k数)所有可以看作从左断点删掉x个右删掉k-x个枚举x即可比较求得中间区间最小的最大值减去最小值 ###代码 #include<bits/stdc++.h> using namespace std; using ll=long long; void slove() { int k, n; cin >> n >> k; vector<int>a(n+1); for(int i=1;i<=...
AtCoder Beginner Contest 361 | 完成度 [6 / 7] https://www.bilibili.com/video/BV1nZ421u7LG/ AtCoder Beginner Contest ABC-361-A https://www.bilibili.com/video/BV1tJbkewEx3/ AtCoder Beginner Contest ABC-361-B https://www.bilibili.com/video/BV1M7bkeYEh1/ AtCoder Beginner Contest ...
AtCoder Beginner Contest 169(题解) AtCoder Beginner Contest 169(题解)E - Count Median结论题给定nnn个xi∈[ai,bi]x_i\in[a_i,b_i]xi∈[ai,bi],求中位数的个数。定义:k=⌊n2⌋k=\lfloor\dfrac{n}{2}\rfloork=⌊2n⌋,对a,ba,ba,b进行排序后,为ak+1a_{k+1}ak...
[AtCoder Beginner Contest 365](https://atcoder.jp/contests/abc365) 题解 ABC365的比赛题解,我做出G题了,但暂时不发,需要的请私信 私信前请看:https://www.luogu.com.cn/paste/lowgb1lx ### A - Leap Year [翻](https://blog.csdn.net/qianzhima2012/article/details/141070004?spm=1001.2014.3001....
Generated testcase example for N=8 A 5.6% failure chance per testcase isn't very encouraging, though it's unlikely that all 28 testscases from the AtCoder's set are stressing the worst possible scenario. So I got my AC verdict on the 3rd attempt during the contest. This wouldn't work...
AtCoder Beginner Contest 043题解(ABCD) 传送门 A - Children and Candies (ABC Edit) 题意:求 ∑ i = 1 n i \sum\limits_{i=1}^n i i=1∑ni 思路:签到题,直接按照公式输出 n ( n + 1 ) 2 \dfrac{n(n+1)}{2} 2n(n+1)。