AtCoder Beginner Contest 360 题解(C-E) C - Move It 题目链接:C - Move It 题目大意:有NN个盒子和NN个物品编号为1−N1−N,物品ii在盒子AiAi中,重量为WiWi,你可以进行一种操作将盒子中的一件物品移动到其他任意盒子中,代价为WiWi,求使得所有盒子中只存在一件物品的最小操作代价。 题解:贪心,可以发...
#include<bits/stdc++.h> usingnamespacestd; usingLL =longlong; intmain(void){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); string s; cin >> s; cout << (s.find('R') < s.find('M') ?"Yes":"No") <<'\n'; return0; } B - Vertical Reading (abc360 B) 题目大...
AtCoder Beginner Contest 360 题解 (abcdeg) 头一次写题解。 A - A Healthy Breakfast r在m前面输出Yes,反之输出No。 统计两个位置比一下就行。 voidsolve(){strings;cin>>s;inta=0,b=0;for(inti=0;i<3;i++)if(s[i]=='R')a=i;elseif(s[i]=='M')b=i;if(a<b)yes;elseno;} B - ...
E - Random Swaps of Balls 假设有n个位置,那么在k次操作后黑球在第一个位置的概率为f(k) = f(k - 1) * (1 + (n - 1) ^ 2) / n ^ 2 + (1 - f(k - 1)) * 2 / n ^ 2 , 即 f(k) = f(k - 2) * (n ^ 2 - 2 * n) / n ^ 2 + 2 / n ^ 2。每次黑球在第一...
We will hold AtCoder Beginner Contest 360. Contest URL: https://atcoder.jp/contests/abc360 Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20240630T2100&p1=248 Duration: 100 minutes Writer: MtSaka, Aotsuki, ynymxiaolongbao, sotanishy Tester: Nyaan, math957963 Rated ...
We will hold AtCoder Beginner Contest 360.Contest URL: https://atcoder.jp/contests/abc360Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20240630T2100&p1=248Duration: 100 minutesWriter: MtSaka, Aotsuki, ynymxiaolongbao, sotanishyTester: Nyaan, math957963...
AtCoder Beginner Contest360 A~E 详细讲解, 视频播放量 243、弹幕量 0、点赞数 9、投硬币枚数 8、收藏人数 2、转发人数 2, 视频作者 joe_zxq, 作者简介 NFLS初二,洛谷红名蓝勾,UID623577,相关视频:【状压DP】Atcoder Regular Contest 179B 讲解,AtCoder Beginner Cont
·AtCoder Beginner Contest (ABC) 这是最频繁且最简单的入门赛,通常情况下每月至少举行2次。2019年4月27日(含)之前,每场比赛共4题,时长100分钟,满分1000分且Rating超过1199的选手不计Rating值。自2019年5月19日起改版升级为6道题目,时长不变,满分2100分且Rating值超过1999的选手不计Rating值。改版之后比赛质量...
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...