This commit is contained in:
James 2020-03-28 08:58:54 +08:00
parent 4dc41586f5
commit 4711b88b92
9 changed files with 49 additions and 0 deletions

3
4061_clear/Readme.md Normal file
View File

@ -0,0 +1,3 @@
# 标题
* 内容

24
4061_clear/clear.cpp Normal file
View File

@ -0,0 +1,24 @@
#include <cstring>
#include <iostream>
using namespace std;
int main()
{
int n, k, now = 0;
string a[101];
cin >> n >> k;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
for (int i = 1; i <= n; i++) {
if (now + a[i].size() <= k) {
if (now > 0) {
cout << " ";
}
} else {
cout << endl;
now = 0;
}
cout << a[i];
now += a[i].size();
}
}

BIN
4061_clear/clear.exe Normal file

Binary file not shown.

3
4061_clear/doc/Readme.md Normal file
View File

@ -0,0 +1,3 @@
# 标题
* 内容

BIN
4061_clear/doc/排版.pdf Normal file

Binary file not shown.

6
4061_clear/main.cpp Normal file
View File

@ -0,0 +1,6 @@
#include <iostream>
int main()
{
std::cout << "Hello Easy C++ project!" << std::endl;
}

BIN
4061_clear/main.exe Normal file

Binary file not shown.

2
4061_clear/test/in.txt Normal file
View File

@ -0,0 +1,2 @@
10 7
hetto my nnne is ccssie and this is my essee

11
4061_clear/test/out.txt Normal file
View File

@ -0,0 +1,11 @@
## z:\Chao\src\4061_clear\test\in.txt
2020/03/28 ÖÜÁù 8:56:49.28
hetto my
nnne is
ccssie
and this
is my
essee
-----------------------------------------------
Process exited after 180 ms with return value 0