NISHIO Hirokazu[Translate]
AtCoderのPythonでMemoryErrorを出すとREになる
python
xs = [0] * (10 ** 9)

こういうケースは、実際にメモリを確保してメモリ制限を超えるより前に、Python処理系が「そんな量の確保はできないよ」と実行時例外を投げている。なのでジャッジサーバ上の表示はMLEではなくREになる。

"Engineer's way of creating knowledge" the English version of my book is now available on [Engineer's way of creating knowledge]

(C)NISHIO Hirokazu / Converted from [Scrapbox] at [Edit]