1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AtCoder_入力読み取り用スニペット

1
Posted at

概要

Atcoder入力読み取り用スニペット
中身の動作は以下参照
AtCoder_入力読み取り用マクロ

Code→基本設定→ユーザスニペット
から設定

cpp.json
{
	"AtCoderInput": {
		"prefix": "acin",
		"body": [
			"int $1, $2;",
			"cin >> $1 >> $2;"
		],
	},
	"AtCoderInput1": {
		"prefix": "acin1",
		"body": [
			"int $1;",
			"cin >> $1;",
			"vector<int> $2($1);",
			"for(int i = 0; i < $1; i++) {",
			"    cin >> $2[i];",
			"}"
		],
	},
	"AtCoderInput2": {
		"prefix": "acin2",
		"body": [
			"int $1, $2;",
			"cin >> $1 >> $2;",
			"vector<vector<int>> $3($2, vector<int>($1));",
			"for(int i = 0; i < $2; i++) {",
			"    for(int j = 0; j < $1; j++) {",
			"        cin >> $3[i][j];",
			"    }",
			"}",
		],
	},
}
1
1
0

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
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?