-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path11965.cpp
More file actions
33 lines (32 loc) · 726 Bytes
/
11965.cpp
File metadata and controls
33 lines (32 loc) · 726 Bytes
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
#include <bits/stdc++.h>
using namespace std;
int main() {
char a[501];
char b[501];
int i, j, k, l, t, n;
scanf("%d", &t);
for (i = 1; i <= t; i++) {
scanf("%d", &n);
getchar();
if (i != 1) {
printf("\n");
}
printf("Case %d:\n", i);
while (n--) {
gets(a);
k = 1;
b[0] = a[0];
for (j = 1; a[j] != '\0'; j++) {
if (a[j] == ' ' && a[j - 1] == ' ') {
continue;
} else {
b[k] = a[j];
k++;
}
}
b[k] = '\0';
printf("%s\n", b);
}
}
return 0;
}