-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.cpp
46 lines (44 loc) · 966 Bytes
/
run.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// g++ run.cpp -o run
// run path\文件名
#include <assert.h>
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
const int N = 1005;
const int INF = 0x3f3f3f3f;
int main(int argc, char **argv)
{
// printf("%d\n", argc);
if (argc == 1)
{
printf("missing cpp\n");
exit(1);
}
if (argc > 2)
{
printf("too many parameter\n");
exit(1);
}
string tt = "g++ ";
tt += string(argv[1]);
tt += ".cpp -o ";
tt += string(argv[1]);
tt += " -O3 -msse -msse2 -msse3 -funroll-loops -std=c++11 -Ofast -march=native -ffast-math -DLOCAL";
int t1 = system(tt.c_str());
tt = string(argv[1]) + ".exe";
int t2 = system(tt.c_str());
}