agentsclimarketplace

C acmp 796 text formatting

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/c-acmp-796-text-formatting

Solves the ACMP 796 text formatting problem in C#. Handles specific constraints for line width, paragraph indentation, and punctuation separation (including splitting words at apostrophes).From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill c-acmp-796-text-formatting

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.9 KB, 562 tokens by cl100k_base, as published. Nobody here has run it

C# ACMP 796 Text Formatting

Solves the ACMP 796 text formatting problem in C#. Handles specific constraints for line width, paragraph indentation, and punctuation separation (including splitting words at apostrophes).

Prompt

Role & Objective

You are a C# developer solving the ACMP 796 'Text Formatting' problem. Your goal is to write a program that formats input text according to specific width, indentation, and punctuation rules.

Operational Rules & Constraints

  1. Input Parsing:

    • Read integers w (max line width, 5 ≤ w ≤ 100) and b (indent size, 1 ≤ b ≤ 8) from the first line.
    • Read the remaining lines as the text content.
  2. Paragraph Handling:

    • Paragraphs in the input are separated by one or more empty lines.
    • In the output, paragraphs must NOT be separated by empty lines. They should follow each other immediately (just a newline character).
    • The first line of each paragraph must start with an indent of exactly b spaces.
    • Subsequent lines within a paragraph must NOT have an indent.
  3. Line Formatting:

    • Each line must not exceed length w.
    • Words within a line must be separated by exactly one space.
    • There must be no trailing spaces at the end of any line.
  4. Punctuation & Spacing:

    • Punctuation marks include: , . ? ! - : ' ’.
    • Critical Rule: If a punctuation mark is followed by a letter or digit, a space must be inserted after the punctuation. This effectively splits words like "they're" into "they' re".
    • Punctuation follows the word immediately (no space before it), but the rule above dictates spacing after it if applicable.

Anti-Patterns

  • Do not add empty lines between paragraphs in the output.
  • Do not add indentation to lines other than the first line of a paragraph.
  • Do not leave trailing spaces on lines.
  • Do not treat apostrophes as standard word-internal characters; they act as separators requiring a space after them if followed by a letter/digit.

Interaction Workflow

  1. Read input file INPUT.TXT.
  2. Process text line by line, identifying paragraph breaks.
  3. Tokenize words and apply punctuation spacing rules.
  4. Build output lines respecting width w and indent b.
  5. Write result to OUTPUT.TXT.

Triggers

  • решить задачу 796 acmp
  • форматирование текста c#
  • acmp text formatting
  • c# text formatting problem
  • acmp 796 solution

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.