README ¶ Codeforces AC Codes Compiler info: go1.15.6, windows, 386 代码框架 编写一个 run(io.Reader, io.Writer) 函数来处理输入输出。这样写的理由是: 在 main 中调用 run(os.Stdin, os.Stdout) 来执行代码; 测试时,将测试数据转换成 strings.Reader 当作输入,并用一个 strings.Builder 来接收输出,将这二者传入 run 中,然后就能比较输出与答案了; 对拍时需要实现一个暴力算法 runAC,参数和 run 一样。通过随机数据生成器来生成数据,分别传入 runAC 和 run,通过比对各自的输出,来检查 run 中的问题。 例如:1439C_test.go 交互题的写法要复杂一些,为方便测试,需要把涉及输入输出的地方抽象成接口,详见 interactive_problem。 Expand ▾ Collapse ▴ Directories ¶ Show internal Expand all Path Synopsis 1-99 100-199 1000-1099 1100-1199 1200-1299 1300-1399 1400-1499 1500-1599 1600-1699 200-299 300-399 400-499 500-599 600-699 700-799 800-899 900-999 edu 2/binarysearch/step1/a command 2/binarysearch/step1/b command 2/binarysearch/step1/c command 2/binarysearch/step1/d command 2/binarysearch/step2/a command 2/binarysearch/step2/b command 2/binarysearch/step2/c command 2/binarysearch/step2/d command 2/binarysearch/step2/e command 2/binarysearch/step2/f command 2/binarysearch/step2/g command 2/binarysearch/step2/h command 2/binarysearch/step3/a command 2/binarysearch/step3/b command 2/binarysearch/step3/c command 2/binarysearch/step3/d command 2/binarysearch/step4/a command 2/binarysearch/step4/b command 2/binarysearch/step4/c command 2/binarysearch/step5/a command 2/binarysearch/step5/b command 2/binarysearch/step5/c command 2/disjointset/step1/a command 2/disjointset/step1/b command 2/disjointset/step1/c command 2/disjointset/step1/d command 2/disjointset/step1/e command 2/disjointset/step2/a command 2/disjointset/step2/b command 2/disjointset/step2/c command 2/disjointset/step2/d command 2/disjointset/step2/e command 2/disjointset/step2/f command 2/disjointset/step2/g command 2/disjointset/step2/h command 2/disjointset/step2/i command 2/disjointset/step2/j command 2/disjointset/step3/a command 2/disjointset/step3/b command 2/disjointset/step3/c command 2/segmenttree1/step1/a command 2/segmenttree1/step1/b command 2/segmenttree1/step1/c command 2/segmenttree1/step2/a command 2/segmenttree1/step2/b command 2/segmenttree1/step2/c command 2/segmenttree1/step2/d command 2/segmenttree1/step3/a command 2/segmenttree1/step3/b command 2/segmenttree1/step3/c command 2/segmenttree1/step3/d command 2/segmenttree1/step3/e command 2/segmenttree1/step4/a command 2/segmenttree1/step4/b command 2/segmenttree1/step4/c command 2/segmenttree1/step4/d command 2/segmenttree1/step4/e command 2/segmenttree2/step1/a command 2/segmenttree2/step1/b command 2/segmenttree2/step1/c command 2/segmenttree2/step2/a command 2/segmenttree2/step2/b command 2/segmenttree2/step2/c command 2/segmenttree2/step2/d command 2/segmenttree2/step2/e command 2/segmenttree2/step2/f command 2/segmenttree2/step3/a command 2/segmenttree2/step3/b command 2/segmenttree2/step3/c command 2/segmenttree2/step4/a command 2/segmenttree2/step4/b command 2/segmenttree2/step4/c command 2/segmenttree2/step4/d command 2/segmenttree2/step4/e command 2/segmenttree2/step4/f command 2/suffixarray/step5/a command 2/suffixarray/step5/b command 2/suffixarray/step5/c command 2/suffixarray/step5/d command 2/suffixarray/step5/e command 2/suffixarray/step5/f command 2/twopointers/step1/a command 2/twopointers/step1/b command 2/twopointers/step1/c command 2/twopointers/step2/a command 2/twopointers/step2/b command 2/twopointers/step2/c command 2/twopointers/step2/d command 2/twopointers/step2/e command 2/twopointers/step2/f command 2/twopointers/step2/g command 2/twopointers/step3/a command 2/twopointers/step3/b command 2/twopointers/step3/c command 2/twopointers/step3/d command 2/twopointers/step3/e command 2/twopointers/step3/f command 2/twopointers/step3/g command 2/twopointers/step3/h command 2/twopointers/step3/i command 2/zfunction/step1/a command 2/zfunction/step1/b command 2/zfunction/step1/c command 2/zfunction/step1/d command 2/zfunction/step2/a command 2/zfunction/step2/b command 2/zfunction/step3/a command 2/zfunction/step4/a command 2/zfunction/step4/b command 2/zfunction/step4/c command 2/zfunction/step4/d command 2/zfunction/step4/e command 2/zfunction/step4/f command 2/zfunction/step4/h command 2/zfunction/step4/i command gym 100723 command 101234 command 101309 command 101414 command 101487 command testutil Click to show internal directories. Click to hide internal directories.