跳到正文

剪贴板

剪贴板 glshokk5

原文
剪贴板信息

剪贴板信息

收录
更新
C++
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const string path = "data";
mt19937 egn(time(NULL));
void solve(int id, int l, int r, int n, int k) {
	auto rnd = [&](LL L, LL R) {
		return uniform_int_distribution<LL>(L, R)(egn);
	};
	for (int dat = l; dat <= r; dat ++) {
		string str = path + to_string(id) + "-" + to_string(dat) + ".in";
		freopen(str.c_str(), "w", stdout);

        // write down your data maker here

		fclose(stdout);
	}
}
int main() {
	solve(21, 25, 20, 1000, 1000);
	return 0;
}
C++
#include <bits/stdc++.h>
using namespace std;
const string path = "data";
int main() {
    for (int i = 1; i <= 20; i ++) {
		string name = path + to_string(i);
        string qwq = string("std.exe <") + (name + ".in") + " > " + (name + ".out");
        system(qwq.c_str());
    }
    return 0;
}

C++
string to_string(int x) {
	string s;
	while (x) s.push_back(x % 10 + '0'), x /= 10;
	reverse(s.begin(), s.end());
	return s;
}
C++
#include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
using namespace std;
namespace Milkcat {
	typedef long long LL;
	typedef pair<LL, LL> pii;
    typedef vector<LL> poly;
	const int N = 1e6 + 5;
	const string path = "snake";
	void copy(string x, string y) {
		freopen(x.c_str(), "r", stdin);
		freopen(y.c_str(), "w", stdout);
		char ch;
		while (~(ch = getchar())) cout << ch;
		fclose(stdin), fclose(stdout);
		system(((string)("del ") + x.c_str()).c_str());
	}
	int main() {
	    for (int i = 1; i <= 10; i ++) {
			string name = path + to_string(i);
			copy(name + ".ans", name + ".out");
	    }
	    return 0;
	}
}
int main() {
    int T = 1;
    while (T --) Milkcat::main();
    return 0;
}