-
Notifications
You must be signed in to change notification settings - Fork 0
/
gen.py
63 lines (49 loc) · 1.54 KB
/
gen.py
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
# ------------------------------------------------------------------------------------------------ #
# rust #
# ------------------------------------------------------------------------------------------------ #
# for i in range(1, 26):
# with open(f"./aoc2017/src/day{i}.rs", "w") as f:
# f.write(
# f"""#![allow(unused_imports)]
# use crate::get_data;
# use crate::utils::*;
# pub fn p1(data: String) -> usize {{
# 0
# }}
# pub fn p2(data: String) -> usize {{
# 0
# }}
# #[test]
# fn test_d{i}() {{
# let data = get_data({i});
# assert_eq!(p1(data.clone()), 0);
# assert_eq!(p2(data), 0);
# }}"""
# )
# with open(f"./aoc2017/test_data/day{i}.txt", 'w') as f:
# pass
# ------------------------------------------------------------------------------------------------ #
# cpp #
# ------------------------------------------------------------------------------------------------ #
for i in range(1, 26):
with open(f"./aoc2018/src/day{i}.hpp", "w") as f:
f.write(
"""
#include "utils.hpp"
#include <string>
#include <vector>
#include <iostream>
#include <map>
#include <tuple>
u64 p1(std::string data) {
u64 result = 0;
return result;
}
u64 p2(std::string data) {
u64 result = 0;
return result;
}
"""
)
with open(f"./aoc2018/test_data/day{i}.txt", 'w') as f:
pass