跳到正文

个人记录

关于 Trash Round #1 幸运奖

CYFqwq约 1 分钟
原文
文章信息与版本

文章信息

发布
2026年10月23日
收录
2026年10月23日
更新
2026年11月20日
篇幅
约 1 分钟

版本

  1. v3当前
  2. v2
  3. v1

评奖规则

幸运奖将在 1111 月 23∼2423\sim 24 日进行评奖,只对排行榜上的可评奖选手进行评奖。

评奖程序

C++
#include<bits/stdc++.h>
using namespace std;

mt19937 rng(6578);
const int N = 110;
string a[N];

int main() {
	int n;
	cin >> n;
	for (int i = 1; i <= n; i++) cin >> a[i];
	for (int i = 1; i <= n; i++) swap(a[rng()%n+1], a[i]);
	cout << "---Award Results---\n";
	if (n >= 1) cout << a[1] << " " << 5 << "\n";
	if (n >= 2) cout << a[2] << " " << 4 << "\n";
	if (n >= 3) cout << a[3] << " " << 3 << "\n";
	return 0;
}

按照排行榜上的排名输入选手用户名。

原文