瞎搞题啊.找出1 1 0 0这样的序列,然后存起来,这样的情况下最好的选择是1的个数除以这段的总和. 然后从前向后扫一遍.变扫边进行合并.每次合并.合并的是他的前驱.这样到最后从t-1找出的那条链就是最后满足条件的数的大小. Room and Moor Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 307 Accepted…
链接:https://www.nowcoder.com/acm/contest/104/B来源:牛客网 题意:A few days ago, WRD was playing a small game called Salty Fish Go. We can simplify the rules of the game as follows. 给你v,l,n,m代表有v个速度,下一行分别给出v个速度,l长的路,n个随机地点随机改变速度的加油站,m个随机地点宝藏.问拿到所有宝藏的时间期望. 题解:瞎…
链接:https://www.nowcoder.com/acm/contest/139/E 来源:牛客网 Bobo has a sequence of integers s1, s2, ..., sn ≤ si ≤ k. Find +) after removing exactly m elements. 输入描述: The input consists of several test cases and is terminated by end-of-file. The first line…
题目传送门 sol1:用bitset来维护,其实感觉挺暴力的,不怎么会用bitset,借着这道题学习一下. bitset暴力维护 #include "bits/stdc++.h" #define debug puts("what the fuck"); using namespace std; ; char s[MAXN]; bitset<> bs[][MAXN]; int main() { int n, m, q; scanf("%d%d&q…
[1]查找最晚入职员工的所有信息 CREATE TABLE `employees` ( `emp_no` ) NOT NULL, `birth_date` date NOT NULL, `first_name` ) NOT NULL, `last_name` ) NOT NULL, `gender` ) NOT NULL, `hire_date` date NOT NULL, PRIMARY KEY (`emp_no`)); 题解: ; [2]查找入职员工时间排名倒数第三的员工所有信息 (表同问…
所有牛客多校的做题记录请右转队伍wiki Name Date Rank 2018 Multi-University,Nowcoder Day 1 2018.7.19 16/338 5/10 https://acm.ecnu.edu.cn/wiki/index.php?title=2018_Multi-University,Nowcoder_Day_1 2018 Multi-University,Nowcoder Day 2 2018.7.21 57/338 4/11 https://acm.ec…