The Wayback Machine - https://web.archive.org/web/20211025202227/https://github.com/topics/programming-contests
Skip to content
#

programming-contests

Here are 301 public repositories matching this topic...

online-judge
kmyk
kmyk commented Sep 25, 2021

Description / 説明

スコープに被りがなければ変数名に suffix を付けないでほしい

The current implementation avoids name conflicts of variables even when the scopes of them are distinct. For example, i and i2 are used in the following result:

int64_t solve(int64_t n, int64_t c, std::vector<int64_t> h) {
    ...
    for (int32_t i = 0; i < 1ll; ++ i) {
        ...
    }
    for (int32_t i2 = 0; i2 < 
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