Skip to content
#

programming-contests

Here are 300 public repositories matching this topic...

kmyk
kmyk commented Sep 4, 2021

Description / 説明

sum / modsum を閉じた式に変換するのはすでに実装がある。
たとえば sum(sorted(map(lambda x: x + 1, xs))) という Python の式が sum(xs) + len(xs) になったりする。
実装:

https://github.com/kmyk/Jikka/blob/52299f06f7f8d96643198b2cff95fd873da9b371/src/Jikka/Core/Convert/CloseSum.hs#L42-L68

product / modproduct については実装がまだ途中。これを完成させたい。
具体的には次をやる:

  • 古い形式のパターンマッチで書かれているが、これを 準クォートを使った形式 (`[r| "sum/range" f
kmyk
kmyk commented Aug 27, 2021

Description / 説明

#line "/path/to/library.hpp" 123 ってなる部分のパスを常に相対パスにしたい。

Motivation / 動機

oj-bundle使うとにファイルへの絶対パスが埋め込まれるから真名がojに刻まれてるな

$USER とかに実名を埋め込んだ結果として提出で実名大公開してる人をわりと見かける。相対パスにしておいた方がよい。

他:

  • #line directive は必要なのでデフォルトでは付けたい
    • ライセンス表示がファイル冒頭に埋め込んであるライブラリとの親和性がよいため。ライセンスまわりをきちんと扱ってるライブラリ (現状は見かけたことないけど……?) にやさしくしておきたい
    • あとコンパイラや gdb がこれを認識してうまくやってくれる

Improve this page

Add a description, image, and links to the programming-contests topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the programming-contests topic, visit your repo's landing page and select "manage topics."

Learn more