Блог пользователя FHVirus

Автор FHVirus, история, 6 месяцев назад, По-английски

Hello Codeforces! Today I feel like thirsty for contribution, so I'll share some trick to get (almost) unlimited amount of (almost) square grid paper during contest, and hope that I will get some contribution.

If you use Vim, open an empty file and type the following from normal mode:

i+<esc>25A---+<esc>
o|<esc>25A   |<esc>
ggVGyG35pGdd

Then you will get this: Da Grid

The Vim commands are basically just doing the copy-and-paste part for you. If you don't use Vim, you can manually produce the pattern instead.

The grid is 101 characters wide * 71 characters high, or 25 cells wide * 35 cells high. 101 * 71 characters roughly matches domjudge's upper limit for printing, but please test it in testing session. This trick has been tested in 2023 Taoyuan regional, and the staff have approved this trick.

Since the grid cells are (almost) square, you can use them in DP and Geometry problems. Happy printing!

P.S. Please don't print more than you need. Some people got warning from juries for printing 10+ pages of grid paper during testing session.

  • Проголосовать: нравится
  • +341
  • Проголосовать: не нравится

»
6 месяцев назад, # |
  Проголосовать: нравится +31 Проголосовать: не нравится

Some vim golf, your last line can be replaced with this, saving some keystrokes :0

ggyj35PGdd
  • »
    »
    6 месяцев назад, # ^ |
      Проголосовать: нравится +13 Проголосовать: не нравится

    Are we playing vimgolf?

    i|<esc>25A   |<esc>
    o+<esc>25A---+<esc>
    Vky35Pdd
    
    • »
      »
      »
      6 месяцев назад, # ^ |
        Проголосовать: нравится +8 Проголосовать: не нравится

      I guess we are playing vimgolf!

      35i---+<enter>   |<enter><esc>dk
      <c-v>gg$y25P<c-v>Gx..
      
      • »
        »
        »
        »
        6 месяцев назад, # ^ |
        Rev. 4   Проголосовать: нравится +18 Проголосовать: не нравится
        35i+---+<enter>|   |<enter><esc>dk
        l<c-v>gg$y24P
        

        My original solution: 30
        Your solution: 29
        My solution: 27

        Script
        • »
          »
          »
          »
          »
          6 месяцев назад, # ^ |
            Проголосовать: нравится +18 Проголосовать: не нравится

          Ah yes vimgolf!

          One key less:

          35i+---+<enter>|   |<enter><esc>dk
          l<c-v>{$y24P
          
»
6 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I'm confused, why don't you just use scrap paper

»
6 месяцев назад, # |
  Проголосовать: нравится +51 Проголосовать: не нравится

God-tier blog

»
6 месяцев назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

I'm confused, why don't you bring grid paper with you beforehand

  • »
    »
    6 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I am confused , why not just draw some horizontal lines and vertical lines on a whiteboard!!

  • »
    »
    6 месяцев назад, # ^ |
      Проголосовать: нравится +18 Проголосовать: не нравится

    Some regionals (e.g. Taoyuan) don't let contestants bring extra paper, so we might have to sacrifice some spaces in our codebook if we want to bring pre-printed grid paper.

    • »
      »
      »
      6 месяцев назад, # ^ |
        Проголосовать: нравится +5 Проголосовать: не нравится

      Oh so there are some constraints e.g. 20 pages at most? Then that's understandable.

»
6 месяцев назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

I think I'm the only person who use Excel for visualizing dp :)