跳到正文

Q1_Only

1004460

这个傻逼S组又挂分了

这是 2026年11月7日 存档的第 4 版,不是当前版本。查看当前版本

资料、奖项与版本

解密

备忘录1

C++
#include <bits/stdc++.h>
using namespace std;
string t = "jinitaimei";
void open(int i) {
	string q = t + to_string(i) + ".in";
	freopen(q.c_str(), "w", stdout);
}
void open1(int i) {
	string s = t + to_string(i) + ".in";
	string q = t + to_string(i) + ".out";
	freopen(s.c_str(), "r", stdin);
	freopen(q.c_str(), "w", stdout);
}
void close() {
	freopen("CON", "r", stdin);
	freopen("CON", "w", stdout);
}
void run(int idx) {
	open(idx);
	mt19937_64 gen(1990913 + idx);
	
	close();
}
void run1(int idx) {
	open1(idx);
	
	close();
}
int main() {
	//ios::sync_with_stdio(false);
	int t = 5;
	while (t--) {
		run(t + 1);
	}
	t = 5;
	while (t--) {
		run1(t + 1);
	}
	return 0;
}
ar(a−b)(a−c)+br(b−a)(b−c)+cr(c−a)(c−b)={0r∈{0,1}1r=2a+b+cr=3\frac{a^r}{(a-b)(a-c)}+\frac{b^r}{(b-a)(b-c)}+\frac{c^r}{(c-a)(c-b)}=\left\{\begin{matrix} 0 & r\in\{0,1\}\\ 1 & r = 2\\ a+b+c & r = 3 \end{matrix}\right.