Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main() {
- FILE *in = fopen("input.txt", "r");
- FILE *out = fopen("output.txt", "w");
- fgets(S, 5000 + 2, in);
- n = strlen(S);
- if (S[0] == ' ') {
- ++k1;
- ++count;
- R1[0] = k1;
- LINK[k1] = k1;
- }
- for (int i = 1; i < n; ++i) {
- if (S[i] == ' ') {
- if (S[i - 1] != ' ') {
- ++k1;
- ++count;
- }
- R1[i] = k1;
- LINK[k1] = k1;
- }
- }
- while (!0) {
- for (int i = 1; i < n; ++i) {
- LINK[i] = i;
- }
- if (fgets(S, n + 2, in) == NULL) break;
- k2 = k1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement