LoginSignup
4

More than 3 years have passed since last update.

C#+VS Code でAtCoder やってみる(準備編)

Last updated at Posted at 2019-01-04

c# で競プロの環境を構築した内容の備忘録です。

対象

以下の条件の方向けの記事になります。
- 競プロの環境を構築したい
- C# で競プロに参加したい
- Mac を利用している
- Visual Studio Code でコーディングしたい

VS Code を使ったC#のコーディング環境構築

VS Code のインストール

VS Code のインストールリンク

.NET Core SDK のインストール

.NET Core SDK のインストールリンク

C# のプラグインインストール

VS Code のC#プラグインインストールリンク

競プロのためのツール導入

online-judge-tools のインストール

pip3 install online-judge-tools

環境構築(AtCoderの場合)

この問題を解くと仮定して構築してみます。

C# のプロジェクト作成

mkdir procon
cd procon
dotnet new console -o agc030_a
cd agc030_a

この後は、agc030_aディレクトリにあるProgram.cs を編集し、
コーディングします。

コーディング後、test caseのチェック

上記の続きです。

cd ~/procon/agc030_a
oj dl https://atcoder.jp/contests/agc030/tasks/agc030_a
oj test -c "dotnet run --project $PWD"

このコマンドを実行すると、以下のようなテスト結果が出ます。

スクリーンショット 0031-01-04 19.14.04.jpg

参考

次回予定(未定)

  • C# で競プロする際のコーディング上の注意点
  • C# で競プロする際のハック

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
4