Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given
转载 2020-05-07 16:29:00
71阅读
2评论
题目题意:n为老鼠的数量,每组最多m个老鼠。先给出n个老鼠的重量,再给出老鼠的初始顺序(第i名的老鼠是第j号,j从0开始)。每m个老鼠分为一组,对于每组老鼠,选出最重的那个,晋级下一轮比赛,然后依次再以m个老鼠一组分类,然后选出重量最大的。。。直到只剩下一只老鼠,排名为1.输出为老鼠的排名,这个排名是按照原输入老鼠的顺序输出的tip:queue + 模拟#include<io...
原创 2023-06-27 10:25:00
74阅读
1056 Mice and Rice (queue)思路:queuequeuequeue每轮淘汰的人的排名该轮晋级的人数+1+1+1,然后就可以用队列模拟了。#include<bits/stdc++.h>using namespace std;typedef long long ll;const int N=1e3+5,M=2e4+5,inf=0x3f3f3f3f,mod=1e9+7;#define mst(a,b) memset(a,b,sizeof a)#define lx
原创 2021-08-10 09:44:07
16阅读
题目来源:https://cn.vjudge.net/contest/322917题意:开始有w只白鼠,b只黑鼠,公主先手,龙后手开始抽不放回的抽样实验。谁先抽到白鼠谁就赢了。如果龙抽了一次后,就会有一只鼠逃出实验箱,每次老鼠逃出的概率是相等的;。题解来自:https://www.cnblogs.com/1013star/p/10361574.html以下来自:https:...
原创 2021-09-06 14:19:06
82阅读
1056Mice and Rice(25分)Mice and Riceis the name of a programming contest in which each programmer must writ
原创 2023-03-02 05:45:34
32阅读
1056 Mice and Rice (queue)思路:queuequeuequeue每轮淘汰的人的排名该轮晋级的人数+1+1+1,然后就可以用队列模拟了。#include<bits/stdc++.h>using namespace std;typedef long long ll;const int N=1e3+5,M=2e4+5,inf=0x3f3f3f3f,mod=1e9+7;#define mst(a,b) memset(a,b,sizeof a)#define lx
原创 2022-01-21 13:34:03
35阅读
题目来源:https://cn.vjudge.net/contest/322917题意:开始有w只白鼠,b只黑鼠,公主先手,龙后手开始抽不放回的抽样实验。谁先抽到白鼠谁就赢了。如果龙抽了一次后,就会有一只鼠逃出实验箱,每次老鼠逃出的概率是相等的;
原创 2022-03-13 11:16:04
63阅读
It is raining today.It is windy outside.I am sitting in my office writing code.Suddenly,I was interested in reading
原创 2022-08-03 13:39:03
78阅读
1056 Mice and Rice (25
原创 2022-09-15 10:51:11
87阅读
D. Bag of mice http://codeforces.com/problemset/problem/148/D time limit per test 2 seconds memory limit per test 256 megabytes input standard input o
原创 2021-08-05 10:51:47
32阅读
题意 给出NP只老鼠的质量,并给出它们的初始顺序,按这个初始顺序把这些老鼠按每NG只分为一组,最后不够NG只的也单独分为一组。对每组老鼠,选出它们中质量最大的1只晋级,这样晋级的老鼠数就等于该轮分组的组数。对这些晋级的老鼠再按上面的步骤每NG只分为一组进行比较,选出质量最大的一批继续晋级,这样直到最
转载 2021-02-22 18:04:00
36阅读
Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given
转载 2017-12-27 17:07:00
28阅读
Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given
转载 2018-03-12 15:06:00
75阅读
返回目录题意本题直接用样例解释。11代表有11只老鼠,3代表每次选3个老鼠进行比较。第二行有11个数字
原创 2022-07-14 17:47:53
44阅读
http://codeforces.com/problemset/problem/797/F F. Mice and Holes time limit per test 1.5 seconds memory limit per test 256 megabytes input standard in
原创 2021-08-05 10:49:07
29阅读
Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given ...
转载 2021-07-19 23:08:00
108阅读
2评论
NP只编号的老鼠(编号0~NP-1) NG这行是NP只老鼠的重量(根据0~NP-1的编号给出的重量)这行是老鼠顺序打乱后形成的一行编号;要求,根据打乱后的编号行,每NG只为一组;每组重量最大的获胜到下一轮;下一轮继续。根据老鼠编号0~NP-1 输出每只老鼠的排名(老鼠的排名为:某只老鼠X参加最后一轮,这一轮有若干只老鼠y晋级,那么某老鼠x的排名为若干加一y+1)
原创 2022-11-25 11:14:30
23阅读
1 题目Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mo
原创 2022-05-26 11:57:16
11阅读
#include<iostream>#include<stdio.h>#include<stdlib.h>#include<math.h>#include<string.h>#include<algorithm> #include<map>#include<vector>#inclu...
原创 2022-07-14 10:16:56
23阅读
题目题意翻译袋子里有ww 只白鼠和bb 只黑鼠 ,A和B轮流从袋子里抓,谁先抓到白色谁就赢。A每次随机抓一只,B每次随机抓完一只之后会有另一只随机老鼠跑出来。如果两个人都没有抓到白色则B赢。A先抓,问A赢的概率。输入一行两个数w,bw,b 。输出A赢的概率,误差10^{-9}10−9以内。数据范围0\le w,b\le 10000≤w,b≤1000 。题目描述The dra...
原创 2021-07-13 14:58:18
57阅读
  • 1
  • 2
  • 3
  • 4
  • 5