比赛 期末考试3 评测结果 C
题目名称 hope I can sort matrix 最终得分 0
用户昵称 LikableP 运行时间 0.000 s
代码语言 C++ 内存使用 0.00 MiB
提交时间 2026-02-11 11:49:09
显示代码纯文本
/*
??= => #
??( => [
??) => ]
??< => {
??> => }
*/

??=include <cstdio>

int arr??(100??);

void Compute(char* program) ??<
  char *pchar = program, *bracket = nullptr;
  int *pint = arr;
  while (*pchar) ??<
    if (*pchar == '+')        ??<          ++*pint;           ??> 
    else if (*pchar == '-')   ??<          --*pint;           ??> 
    else if (*pchar == '??(') ??<      bracket = pchar;       ??>
    else if (*pchar == '??)') ??< if (*pint) pchar = bracket; ??> 
    else if (*pchar == '>')   ??<           pint++;           ??> 
    else if (*pchar == '<')   ??<           pint--;           ??>
    else if (*pchar == '.')   ??<       putchar(*pint);       ??>
    ++pchar;
  ??>
??>

char PROGRAM??(600??) = "+++++++          ++              +[        \
                         +->++++          ++              ++        \
                         ++               >+              ++        \
                         ++          +++++>++++++    ++++<<<-??)>   \
                         --          ---------.>+    .>++++++++++   \
                         ++               ++              +.        \
                         >++++++          ++              ++        \
                         .++++++          --              --        ";

int main() ??<
??=ifdef LOCAL
  freopen("!input.in", "r", stdin);
  freopen("!output.out", "w", stdout);
??=else
  freopen("hopeicansortmatrix.in", "r", stdin);
  freopen("hopeicansortmatrix.out", "w", stdout);
??=endif
  
  Compute(PROGRAM);

  return 0;
??>