Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- /*
- #include <ext/pb_ds/assoc_container.hpp>
- #include <ext/pb_ds/tree_policy.hpp>
- using namespace __gnu_pbds;
- typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
- */
- typedef long long ll;
- typedef long double ld;
- typedef vector<int> vi;
- typedef vector<ll> vl;
- typedef pair<int, int> pii;
- typedef pair<ll, ll> pll;
- typedef map<int, int> mii;
- typedef unordered_map<int, int> umii;
- typedef map<ll, ll> mll;
- typedef unordered_map<ll, ll> umll;
- template <class T1, class T2>
- void maximize(T1 &a, T2 b){
- if (b > a) a = b;
- }
- template <class T1, class T2>
- void minimize(T1 &a, T2 b){
- if (b < a) a = b;
- }
- template <class T>
- void read(T &number)
- {
- bool negative = false;
- register int c;
- number = 0;
- c = getchar();
- if (c=='-'){
- negative = true;
- c = getchar();
- }
- for (; (c>47 && c<58); c=getchar())
- number = number *10 + c - 48;
- if (negative)
- number *= -1;
- }
- template <class T, class ...Ts>
- void read(T &a, Ts& ... args){
- read(a);
- read(args...);
- }
- /*
- struct Node
- {
- int node, len;
- Node() {node = len = 0;}
- Node(int node, int len) {this -> node = node, this -> len = len;}
- };
- typedef vector<Node> vg;
- */
- #define MAX 1000001
- #define MOD 1000000007
- #define fi first
- #define se second
- #define pf push_front
- #define pb push_back
- #define FOR(type, i, a, b) for(type i = (a); i <= (b); i++)
- #define FORD(type, i, b, a) for(type i = (b); i >= (a); i--)
- #define testBit(n, bit) ((n >> bit) & 1)
- #define flipBit(n, bit) (n ^ (1ll << bit))
- #define cntBit(n) __builtin_popcount(n)
- #define cntBitll(n) __builtin_popcountll(n)
- #define randomize mt19937_64 mt(chrono::steady_clock::now().time_since_epoch().count());
- randomize;
- const string prob = "";
- const char LTRS[53] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
- string str2int(int num){
- string s = "";
- while (num)
- s = char(num % 10 + '0') + s,
- num /= 10;
- while (s.length() < 3) s = '0' + s;
- return s;
- }
- inline ll getNum(ll l, ll r){ return l + mt() % (r - l + 1); }
- inline ll getNum(ll n){ return getNum(1, n); }
- inline string getString(ll len){
- string ans = "";
- for (int i = 1; i <= len; i++) ans += LTRS[mt() % 52];
- return ans;
- }
- ll begTest, endTest, lim;
- void print(){
- int n = mt() % lim + 1;
- cout << n << '\n';
- FOR(int, i, 1, n){
- int num = mt() % 1000001;
- num *= (mt() & 1) ? -1 : 1;
- cout << num << ' ';
- }
- }
- main()
- {
- ios_base::sync_with_stdio(0); cin.tie(0);
- cin >> begTest >> endTest >> lim;
- FOR(int, test, begTest, endTest){
- cerr << test << '\n';
- string dir = "TEST" + str2int(test);
- string fileInp = dir + "/" + prob + ".inp";
- string fileOut = dir + "/" + prob + ".out";
- system(("mkdir " + dir).c_str());
- freopen(fileInp.c_str(), "w", stdout);
- print();
- cout.flush(); fclose(stdin);
- system((prob + " < " + fileInp + " > " + fileOut).c_str());
- // system(("python " + prob + ".py < " + fileInp + " > " + fileOut).c_str());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement