第一道自己做出的黑题:https://atcoder.jp/contests/agc047/tasks/agc047_e?lang=en
模板最终版:https://www.luogu.com.cn/paste/zcx4wlm5
#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; }#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; }#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;
}