Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #include <ext/pb_ds/assoc_container.hpp>
- #include <ext/pb_ds/tree_policy.hpp>
- using namespace std;
- using namespace __gnu_pbds;
- #include <dir.h>
- #include <windows.h>
- #include <process.h>
- #define fi first
- #define se second
- #define For(i, l, r) for (int i = l; i < r; i++)
- #define ForE(i, l, r) for (int i = l; i <= r; i++)
- #define FordE(i, l, r) for (int i = l; i >= r; i--)
- #define Fora(v, a) for (auto v: a)
- #define bend(a) a.begin(), a.end()
- #define isz(a) ((signed)a.size())
- typedef long long ll;
- typedef long double ld;
- typedef pair <int, int> pii;
- typedef vector <int> vi;
- typedef vector <pii> vpii;
- typedef vector <vi> vvi;
- string name;
- int tests;
- string itos(int x){
- string ans;
- ans += x / 10 + '0';
- ans += x % 10 + '0';
- return ans;
- }
- signed main(){
- ios_base::sync_with_stdio(0);
- cin.tie(0); cout.tie(0);
- //freopen(".inp", "r", stdin);
- //freopen(".out", "w", stdout);
- cin >> name >> tests;
- mkdir("input");
- mkdir("output");
- For(test, 0, tests){
- system(("copy /y \"Test" + itos(test) + "\\" + name + ".inp\" \"input\"").c_str());
- system(("copy /y \"Test" + itos(test) + "\\" + name + ".out\" \"output\"").c_str());
- system(("ren \"input\\" + name + ".inp\" input" + itos(test) + ".txt").c_str());
- system(("ren \"output\\" + name + ".out\" output" + itos(test) + ".txt").c_str());
- }
- system(("7z a -tzip " + name + ".zip input output").c_str());
- system("rmdir /s /q input output");
- }
- /*
- ==================================================+
- INPUT: |
- --------------------------------------------------|
- --------------------------------------------------|
- ==================================================+
- OUTPUT: |
- --------------------------------------------------|
- --------------------------------------------------|
- ==================================================+
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement