版本比较
一些好玩的经典游戏的数据
正文
增加 106 行删除 4 行
12345676 行未改动1415161718192021222328 行未改动52535455515657585960616263596465666267686970714 行未改动76777879758081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184如果图片/链接炸掉,你可能要用和进入洛谷国际站相同的方法
本文大多数数字都要在前面加“约”。## 石头剪刀布### 规则这是一个全球通用规则统一的双人零和博弈游戏。
6 行未改动先放统计

图片备用链接:https://cdn.luogu.com.cn/upload/image_hosting/yyh65pny.png
来源:[[OC] Percentage of Americans who chose Rock, Paper or Scissors for each of the three rounds in the game. ](https://www.reddit.com/r/dataisbeautiful/comments/137dzxu/oc_percentage_of_americans_who_chose_rock_paper/)
可以看到,所有轮出石头的人都是最多的,第一轮占据了一半多!所以
28 行未改动|---------------------|-----------|| 一年 $365$ 天 | $23$ 人 || $1\sim1000$ 的数字 | $34$ 人 || $1\sim10000$ 的数字 | $118$ 人 || 任意哈希值($2^{256}$) | $2^{128}$ 人 || 任意哈希值($2^{256}$) | 约 $2^{128}$ 人 |
这启示我们写双哈希。## 猜数字这个游戏并不出名,让我们先玩一遍这个游戏### 规则一个 $10\sim50$ 的数字合法的要求这个数字十位和个位上的数都是偶数,且**不能相同**。
像 $25,36$ 就不行。像 $19,36$ 就不行。
现在你想一个合法的数字。::::info[您心中的数字是]::::info[您心中的数字是(成功概率很低)]$46$::::### 解释::::info[猜完再看]4 行未改动20 24 26 28 40 42 46 48```这 $8$ 个。然后在后面说了
> 像 $25,36$ 就不行。> 像 $19,36$ 就不行。
这其实是暗示你往 $>36$ 的数字想(不要问为什么,~~因为我也不会~~这是高深的心理学)
现在只剩下 $40,42,46,48$ 了,$46$ 的概率最大。::::
数据:似乎没有,这个游戏是我在某本忘了的书上看到的,但和小学同学玩下来很对。## 随机数字 1### 规则参加游戏首先需要上缴 $100\times\mathsf{item.minecraft.nether\_star}$。
您首先选一个数字,然后在 $1\sim100$ 中均匀随机选整数 $10^{4}$ 次,统计这些数中和您选的相同的数字次数 $\mathsf{cnt}$,您获得 $\mathsf{cnt}\times\mathsf{item.minecraft.nether\_star}$ 。
显然的,这样无论怎么选择,最后期望都是 $0$。## 随机数字 2### 规则参加游戏首先需要上缴 $120\times\mathsf{item.minecraft.nether\_star}$。
然后在 $1\sim100$ 中均匀随机选整数 $10^{4}$ 次,您在知道这些数据之后选择一个数,统计这些数中和您选的相同的数字次数 $\mathsf{cnt}$,您获得 $\mathsf{cnt}\times\mathsf{item.minecraft.nether\_star}$ 。### 分析这个游戏是赚的,纯数学证明比较困难,下面给出模拟的代码:::::info[code with Github Copilot]```cpp#include <bits/stdc++.h>using namespace std;
int main() { ios::sync_with_stdio(false); cin.tie(nullptr);
const int trials = 10000; // 模拟次数,可自行调大 const int draws = 10000; // 每次抽样次数 const int range = 100; // 数字范围 1~100 const int cost = 120; // 入场费
mt19937 rng(random_device{}()); uniform_int_distribution<int> dist(0, range - 1);
long long sum_max_cnt = 0; long long sum_profit = 0; int not_lose = 0; int win = 0;
vector<int> cnt(range);
for (int t = 0; t < trials; ++t) { fill(cnt.begin(), cnt.end(), 0);
for (int i = 0; i < draws; ++i) { int x = dist(rng); cnt[x]++; }
int mx = *max_element(cnt.begin(), cnt.end()); sum_max_cnt += mx;
int profit = mx - cost; sum_profit += profit; if (mx >= cost) not_lose++; if (mx > cost) win++; }
cout << fixed << setprecision(6); cout << "Trials = " << trials << "\n"; cout << "Expected max count = " << (double)sum_max_cnt / trials << "\n"; cout << "Expected net profit = " << (double)sum_profit / trials << "\n"; cout << "P(not losing) = " << (double)not_lose / trials * 100 << "%\n"; cout << "P(win) = " << (double)win / trials * 100 << "%\n";
return 0;}
```::::
通过模拟 $10^5$ 次,得到赚的概率约为 $91\%$,亏的概率约为 $4.7\%$,期望是 $126.013$,标准差 $4.56$。
下面是表格:

我也不知道为啥看起来比较神金。::::info[AI 使用声明]这部分表格的绘制和模拟代码都有 AI 辅助(图片:GPT-5.1),已经审查内容保证无误。::::## 随机数字 3### 规则参加游戏首先需要上缴 $100\times\mathsf{item.minecraft.nether\_star}$。
**您首先选一个数字,然后请一万名**${\color{red}\textup{\textmd{人类}}}$**志愿者选择** $1\sim100$ 的数字。统计这些数中和您选的相同的数字次数 $\mathsf{cnt}$,您获得 $\mathsf{cnt}\times\mathsf{item.minecraft.nether\_star}$ 。## 分析这个游戏看起来和第一个问题一样玩了个寂寞,但是您可以选择心理热门数字,下面放一个统计

来源:[Pick a number from 1-100: results from 6750 responses across various social media platforms [OC]](https://www.reddit.com/r/dataisbeautiful/comments/88m2mj/pick_a_number_from_1100_results_from_6750/)
表格: https://docs.google.com/spreadsheets/d/1hG_25DCI2fMz210fCt84q-sVth3CNRBAT1OlT7zvKBk/edit?gid=1798635135#gid=1798635135
可以看到 $69$ 这个数字在 $6969$ 人随机选择下出现了 $231$ 次!出现概率约 $3.315\%$ 如果选择类似数字,是赚的。