Skip to content

Commit aa1e9f5

Browse files
committed
update template
1 parent 7fc7fd0 commit aa1e9f5

File tree

2 files changed

+31
-30
lines changed

2 files changed

+31
-30
lines changed

leetcode/.template/main.cpp

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,40 @@ author: [email protected]
33
*/
44

55
#include <bits/stdc++.h>
6+
67
#include "../../lib/LeetCodeInputTemplate.hpp"
78
#include "solution.cpp"
89
using namespace std;
910

1011
typedef vector<int> vi;
1112
typedef vector<vector<int>> vvi;
1213

13-
int main()
14-
{
15-
LeetCodeInput li("0.in");
14+
int main() {
15+
LeetCodeInput li("0.in");
1616

17-
auto l0 = li.get<vvi>(0);
17+
int i = 0;
18+
auto l0 = li.get<vvi>(i++);
1819

19-
chrono::steady_clock::time_point begin = chrono::steady_clock::now();
20-
Solution solution;
21-
auto output = solution.solution(l0);
22-
chrono::steady_clock::time_point end = chrono::steady_clock::now();
23-
cout << "Time difference = " << chrono::duration_cast<chrono::microseconds> (end - begin).count() << "µs" << endl;
20+
chrono::steady_clock::time_point begin = chrono::steady_clock::now();
21+
Solution solution;
22+
auto output = solution.solution(l0);
23+
chrono::steady_clock::time_point end = chrono::steady_clock::now();
24+
cout << "Time difference = "
25+
<< chrono::duration_cast<chrono::microseconds>(end - begin).count()
26+
<< "µs" << endl;
2427

25-
cout << output << endl;
28+
cout << output << endl;
2629

27-
// for (int i: output){
28-
// cout << i << ' ';
29-
// }
30+
// for (int i: output){
31+
// cout << i << ' ';
32+
// }
3033

31-
// for (auto i: output){
32-
// for (int j: i){
33-
// cout << j << ' ';
34-
// }
35-
// cout << '\n';
36-
// }
34+
// for (auto i: output){
35+
// for (int j: i){
36+
// cout << j << ' ';
37+
// }
38+
// cout << '\n';
39+
// }
3740

38-
return 0;
41+
return 0;
3942
}

leetcode/.template/solution.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ author: [email protected]
33
time: O()
44
space: O()
55
6-
Runtime:
7-
Memory Usage:
6+
Runtime:
7+
Memory Usage:
88
*/
99

1010
#include <bits/stdc++.h>
@@ -16,15 +16,13 @@ typedef vector<int> vi;
1616
typedef vector<vector<int>> vvi;
1717

1818
class Solution {
19-
public:
20-
int solution(vvi l0) {
21-
22-
}
19+
public:
20+
int solution(vvi l0) {}
2321
};
2422

2523
const static auto initialize = [] {
26-
std::ios::sync_with_stdio(false);
27-
std::cin.tie(nullptr);
28-
std::cout.tie(nullptr);
29-
return nullptr;
24+
std::ios::sync_with_stdio(false);
25+
std::cin.tie(nullptr);
26+
std::cout.tie(nullptr);
27+
return nullptr;
3028
}();

0 commit comments

Comments
 (0)