|
@@ -1,26 +1,37 @@
|
|
#include <cstdio>
|
|
#include <cstdio>
|
|
|
|
+#include <cstdlib>
|
|
|
|
+#include <cstring>
|
|
|
|
+#include <string>
|
|
|
|
|
|
const int N = 100;
|
|
const int N = 100;
|
|
const int LEN = 80;
|
|
const int LEN = 80;
|
|
const int NUM = 1500;
|
|
const int NUM = 1500;
|
|
const int M = 50000;
|
|
const int M = 50000;
|
|
|
|
|
|
-const char asterisks[] = "**********";
|
|
|
|
-const char dashes[] = "----------";
|
|
|
|
-const char equals[] = "==========";
|
|
|
|
-const char nothing[] = "Sorry, I found nothing.";
|
|
|
|
|
|
+const char asterisks[] = "**********\n";
|
|
|
|
+const char dashes[] = "----------\n";
|
|
|
|
+const char equals[] = "==========\n";
|
|
|
|
+const char nothing[] = "Sorry, I found nothing.\n";
|
|
|
|
+
|
|
|
|
+char buffer[LEN + 1];
|
|
|
|
|
|
struct article {
|
|
struct article {
|
|
-
|
|
|
|
|
|
+ char sent[NUM][LEN + 1];
|
|
} articles[N];
|
|
} articles[N];
|
|
|
|
|
|
|
|
+void read_article(int id) {
|
|
|
|
+ for (int i = 0; fgets(buffer, LEN, stdin) != NULL && strcmp(buffer, asterisks); i++) {
|
|
|
|
+ printf("%s", buffer);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
int main() {
|
|
int main() {
|
|
int n, m;
|
|
int n, m;
|
|
- scanf("%d", &n);
|
|
|
|
- while () {
|
|
|
|
-
|
|
|
|
|
|
+ scanf("%d\n", &n);
|
|
|
|
+ for (int i = 0; i < n; i++) {
|
|
|
|
+ read_article(i);
|
|
}
|
|
}
|
|
- scanf("%d", &m);
|
|
|
|
|
|
+ scanf("%d\n", &m);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|