传送门:https://atcoder.jp/contests/abc164 这次的前三题没有一点思考的必要啊( F题看起来就不可做,日后看看吧 A cpp #include<bits/stdc++.h>usingnamespacestd;intmain(){ints, w; cin>>s>>w;if(w>=s)puts("unsafe");elseputs("safe");return0;} ...
AtCoder Beginner Contest 164 传送门 A - Sheep and Wolves A.cpp B - Battle B.cpp C - gacha 题意:给N个字符串S,求有多少个不同的字符串。 数据范围:1≤N≤2×105,1≤|S|≤10≤≤×5≤||≤10 题解:放set里计数即可。 C.cpp D - Multiple of 2019...
条路, 个银币,每条路需要花费 个银币和 分钟,可以在第 个城市花费 分钟获得 银币(无限次),求从 到 最短路, 代表到第i个城市身上有 个银币的最少花费时间,由于 最大为 ,那么身上只要有 AC代码: const int N = 55; struct P { int v, a, b; }; int n, m, s; vector<P> G[N]; int c[N...
AtCoder Beginner Contest 258(ABCDE(F)GEx) gllonkxc AtCoder Beginner Contest 402 A-F 简易题解,如果题解中有什么问题可以找我反馈,谢谢! A.CBC直接枚举整个字符串,只输出大写字母即可。 int main(){ string s; cin >> s; for(int i = 0 ; i < s.size(); i++){… 枫落发表于At...
AtCoder Beginner Contest 366 A~F AC-Panda 敲代码的老熊猫 1 人赞同了该文章 A.Election 2(思维) 题意: AtCoder 市正在举行市长选举。候选人是高桥和青木。 有 N 张有效选票投给两位候选人中的任何一位,目前正在进行计票。这里, N 是奇数。 目前的计票结果是:高桥 T 票,青木 A 票。 请判断此时选举...
We will hold AtCoder Beginner Contest 166. Contest URL: https://atcoder.jp/contests/abc166 Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20200503T2100&p1=248 Duration: 100 minutes Number of Tasks: 6 Writer: gazelle, kort0n, kyopro_friends, sheyasutaka, ynym...
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...
We will hold AtCoder Beginner Contest 144. Contest URL: https://atcoder.jp/contests/abc144 Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20191027T2100&p1=248 Duration: 100 minutes Number of Tasks: 6 Writer: kort0n, kyopro_friends, sheyasutaka Rated range: ~ ...
[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....
数组的维度,因此,我们需要想办法将 个背包压缩到一个维度里;注意到 ,也就是说每个背包的容量至多是 ,不超过个位数能够表示的最大数 ,如此一来,我们便可以将这 个背包的状态压缩成一个十进制数的形式;具体地, 表示第一个背包已经装了 容量的物品,第二个背包已经装了 ...