Skip to content

Commit 60bf36d

Browse files
committed
完善了OJ的template代码...
1 parent d49e80e commit 60bf36d

File tree

7 files changed

+158
-1
lines changed

7 files changed

+158
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ COMMIT_41="剑指Offer–041-和为S的连续正数序列--http://blog.csdn.net/
4343
COMMIT_42_1="剑指Offer–042-翻转单词顺序列--http://blog.csdn.net/gatieme/article/details/51419097"
4444
COMMIT_42_2="剑指Offer–042-左旋转字符串--http://blog.csdn.net/gatieme/article/details/51407858"
4545

46+
COMMIT_OTHER="完善了OJ的template代码..."
47+
4648

4749
RETURN_TOP ="<br>**您也可以选择[回到目录-剑指Offer--题集目录索引](http://blog.csdn.net/gatieme/article/details/51916802)**"
4850

4951

5052

51-
GITHUB_COMMIT=$(COMMIT_42_1)
53+
GITHUB_COMMIT=$(COMMIT_OTHER)
5254

5355

5456
all:github

template/README.md

Lines changed: 69 additions & 0 deletions
Large diffs are not rendered by default.

template/in.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
3 5
2+
1 2
3+

template/oj.c

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#include <stdio.h>
2+
#include <stdlib.h>
3+
4+
5+
6+
// 调试开关
7+
#define DEBUG
8+
9+
10+
#ifdef DEBUG
11+
12+
#define debug cout
13+
#define dprintf printf
14+
15+
#else
16+
17+
#define debug 0 && cout
18+
#define dprintf 0 && printf
19+
20+
#endif // DEBUG
21+
22+
23+
24+
25+
int main( )
26+
{
27+
freopen("in.txt", "r", stdin);
28+
//freopen("out.txt", "w", stdout);
29+
30+
int a, b;
31+
while(scanf("%d%d", &a, &b) != EOF)
32+
{
33+
printf("%d\n", a + b);
34+
}
35+
36+
37+
return 0;
38+
}

template/oj.cpp

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#include <iostream>
2+
3+
#include <cstdio>
4+
#include <cstdlib>
5+
6+
7+
using namespace std;
8+
9+
10+
11+
// 调试开关
12+
#define DEBUG
13+
14+
15+
#ifdef DEBUG
16+
17+
#define debug cout
18+
#define dprintf printf
19+
20+
#else
21+
22+
#define debug 0 && cout
23+
#define dprintf 0 && printf
24+
25+
#endif // DEBUG
26+
27+
28+
29+
30+
int main( )
31+
{
32+
freopen("in.txt", "r", stdin);
33+
//freopen("out.txt", "w", stdout);
34+
35+
int a, b;
36+
while(scanf("%d%d", &a, &b) != EOF)
37+
{
38+
printf("%d\n", a + b);
39+
}
40+
41+
42+
return EXIT_SUCCESS;
43+
}

template/out.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
8
2+
3
File renamed without changes.

0 commit comments

Comments
 (0)