⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex.dpr

📁 tongji acm-online judge solution
💻 DPR
字号:
program Ural_1094(Input, Output);
const
    MaxLineLen = 80;
    ChSet = ['A'..'Z', 'a'..'z', '0'..'9', ':', ';', '-', '!', '?', '.', ',',
        '<', '>', ' '];
type
    TIndex = Integer;
    Strings = array[1..MaxLineLen + 1] of Char;
var
    i: TIndex;
    St: Strings;
    Ch: Char;
begin
    for i := 1 to MaxLineLen do
        St[i] := ' ';
    // note: "a>>" ="a  "!!
    i := 1;
    while not Eof do
    begin
        Read(Ch);
        if Ch in ChSet then
            if Ch = '<' then
            begin
                Dec(i);
                if i = 0 then i := 1;
            end
            else
            begin
                if Ch <> '>' then St[i] := Ch;
                Inc(i);
                if i = MaxLineLen + 1 then i := 1;
            end;
    end;
    for i := 1 to MaxLineLen do
        Write(St[i]);
end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -