Giter Site home page Giter Site logo

atcoder's Introduction

atcoder

AtCoder でACした問題を記録するレポジトリです。

setup

atcoder-cli を使って、コードを提出するフローを自動化しているので、その設定について紹介します。インストールやログイン、その他の細かい設定については 公式のレポジトリ を参考にしてください。

まず、.cpp のテンプレートを自動作成するため、 acc config-dir で表示されたディレクトリに cpp/main.cpp を作成します。

#include <bits/stdc++.h>
#define rep(i, N) for (int i = 0; i < (N); i++)
using namespace std;
using ll = long long;

int main() {
    int N;
    cin >> N;

    int ans = 0;

    cout << ans << endl;
    return 0;
}

そして cpp/template.json に以下の設定を記述します。

{
    "task": {
        "program": ["main.cpp"],
        "submit": "main.cpp"
    }
}

make file and test case

例えば、ABC100の問題が解きたいときは、

$ acc new abc100

とし、解きたい問題を選択します。a, b, cの問題を選んだとすると、 abc100 直下に abc のディクトリが作成され、それぞれのディレクトリに先ほど設定したテンプレートファイルと、テストケースが生成されます。

test

コードが完成したら、テストケースを走らせます。コンパイルして、oj コマンドによりテストを行いますが、面倒なので、以下の2つのコマンドを acc-test としてaliasに登録しています。

g++ main.cpp
oj t -d tests/

submit

テストケースが通っていることが確認できたら、以下のコマンドで提出できます。

$ acc submit

atcoder's People

Contributors

fhiroki avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.