跳到正文

mian_ku

871004

啥也不会的傻子

这是 2026年10月22日 存档的第 1 版,不是当前版本。查看当前版本

资料、奖项与版本

资料

编号
871004
抓取

奖项

2025 CSP-S
二等奖

版本

  1. v3当前
  2. v2
  3. v1

第一道自己做出的黑题:https://atcoder.jp/contests/agc047/tasks/agc047_e?lang=en

模板最终版:https://www.luogu.com.cn/paste/zcx4wlm5

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

template <typename T> void _p (T x) { cout << x << ", "; }
template <typename T, typename ...R> void _p (T x, R ...r) { _p (x), _p (r ...); }
template <typename ...R> void _d (const char *name, R ...r) {
	cout << name << ": "; _p (r...); cout << endl; 
}
template <typename T> void _r (const char *name, T a, int n) {
	cout << name << ": {";
	for (int i = 1 ; i < n ; i ++) _p (a [i]);
	cout << a [n] << "}\n";
}
#define debug(...) _d (#__VA_ARGS__, __VA_ARGS__)
#define debua(a,n) _r (#a, a, n)

void Turn () {
	
}

int _; void Init () {
//	ios :: sync_with_stdio (0); cin. tie (0); cout. tie (0);
	_ = 1;
//	freopen (".in", "r", stdin);
//	freopen (".out", "w", stdout);
//	cin >> _;
}

	signed main () { Init ();
	while (_ --> 0)
	Turn (); return 0; }
C++
#include <bits/stdc++.h>
//#define int long long
using namespace std;

void Turn () {
	
}

int _; void Init () {
//	ios :: sync_with_stdio (0); cin. tie (0); cout. tie (0);
	_ = 1;
//	freopen (".in", "r", stdin);
//	freopen (".out", "w", stdout);
//	cin >> _;
}

	signed main () { Init ();
	while (_ --> 0)
	Turn (); return 0; }
C++
#include <bits/stdc++.h>

using namespace std;

int main (int argc, char **argv) {
	fstream a (argv [1], ios :: in);
	fstream b (argv [2], ios :: in);
	
	char c1, c2; 
	while (a >> c1) {
		b >> c2;
		if (c1 != c2) {
			cout << "Wrong.";
			return 0;
		}
	}
	
	if (b >> c2) {
		cout << "Length wrong.";
		return 0;
	}
	 
	cout << "Accepts.";
	return 0;
} 
代码