GithubHelp home page GithubHelp logo

kyoprocpp's Introduction

競プロ C++ 用環境

git clone --recursive https://github.com/cxconj/kyoprocpp.git
cd kyoprocpp
code .
# remote conatainer で rebuild container をする.
# Ctrl-shift-P or Cmd-Shift-P(macの場合) で Command Palette を開いて、Remote-Containers: Rebuild Container を選択

acc + oj を使う場合

template.json や template となるファイルは自分で用意。普通に作るとgit 管理外になるので、どこかにbackupあるといいかも move-it-to-config/ にtemplate の設定とファイルをおいてあるので、それを設定に移すことでも設定可能

コンパイルしてojを実行するコマンドはalias/shortcut に入ってると便利かも echo "alias coj='g++ main.cpp -o main && oj t -c ./main'" >> ~/.bashrc

test.txt を使う場合

何か C++ のプログラムを作る。ここでは例として hoge.cpp とする。

#include <atcoder/all>
using namespace atcoder;
using mint = modint998244353;
#include <bits/stdc++.h>
using namespace std;


int main() {
    int x;
    cin >> x;
    cout << "hello " << x << endl;

    mint y = 998244352;
    cout << (y * 3).val() << endl;

    return 0;
}

test.txt に標準入力に与える値を書く

123

実行する

$ bin/run hoge  # ファイル名から拡張子を取ったものを run command に与える
g++ -g -O2 -Wall -std=gnu++17 -I .    hoge.cpp   -o hoge
./hoge < test.txt
hello 123  # ここからが出力
998244350

kyoprocpp's People

Contributors

timtoronto634 avatar cxconj 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.