Submission #00105
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include <bits/stdc++.h> using namespace std; #define int long long template < class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template < class T> bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; } signed main(){ int d; cin >> d; int all = (d*2-1) * (d*2-1); int none = (d*(d-1)/2) * 4; cout << all - none << endl; return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0004 - 黴 |
ユーザー名 | ei1719 |
投稿日時 | 2020-04-25 22:28:41 |
言語 | C++14 |
状態 | Accepted |
得点 | 300 |
ソースコード長 | 399 Byte |
最大実行時間 | 27 ms |
最大メモリ使用量 | 696 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 300 / 300 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in01.txt | AC | 20 ms | 600 KB |
1
|
in02.txt | AC | 22 ms | 696 KB |
1
|
in03.txt | AC | 21 ms | 664 KB |
1
|
in04.txt | AC | 21 ms | 636 KB |
1
|
in05.txt | AC | 21 ms | 612 KB |
1
|
in06.txt | AC | 18 ms | 576 KB |
1
|
in07.txt | AC | 21 ms | 544 KB |
1
|
in08.txt | AC | 27 ms | 512 KB |
1
|
in09.txt | AC | 23 ms | 484 KB |
1
|
in10.txt | AC | 19 ms | 456 KB |
1
|
sample01.txt | AC | 20 ms | 556 KB |
1
|
sample02.txt | AC | 18 ms | 652 KB |
1
|
sample03.txt | AC | 22 ms | 492 KB |
1
|