-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathacejudge.h
84 lines (65 loc) · 1.37 KB
/
acejudge.h
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
* acejudge.h
* universal header file for acejudge source files
* containing:
* headers
* typedefs
* consts
* global functions
*/
#ifndef ACEJUDGE_H
#define ACEJUDGE_H_VERSION 3_0
#define ACEJUDGE_H
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <cctype>
#include <algorithm>
#include <termios.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>
using namespace std;
typedef long long qw;
typedef unsigned int uint;
typedef struct {
int res_num, time, mem;
} run_res;
run_res mkres(int, int, int);
const int max_path = 256;
const int max_line = 1024;
const char default_compile_cpp_cmd[] = "g++ %s -g -o .ajtest/testtmp";
struct prob_cfg {
bool empty, nofile;
char prg_name[max_path];
char cfg_name[max_path];
char ipt_fmt[max_path], opt_fmt[max_path];
int beg_num, end_num, time_lmt, mem_lmt;
char prg_in[max_path], prg_ou[max_path];
bool fin, fou;
prob_cfg();
void load(char*);
void make(char*);
void show();
void get();
void config();
};
void setcolor(int);
void get_char_pre();
void get_char_undo();
int get_cmd();
void get_key();
void get_str(char*);
void get_int(int&);
void file_wrong();
void str_cut(char*);
void show_cmd();
void config(prob_cfg&);
void compile_init();
int compile(prob_cfg&);
void judge(prob_cfg&, bool);
void show_help();
void show_version();
#endif