提出 #11279519
ソースコード 拡げる
#include<iostream>
using namespace std;
int N,X,Y;
int cnt[2020];
main()
{
cin>>N>>X>>Y;
X--,Y--;
for(int i=0;i<N;i++)
{
for(int j=i+1;j<N;j++)
{
cnt[min(j-i,abs(X-i)+1+abs(Y-j))]++;
}
}
for(int k=1;k<N;k++)cout<<cnt[k]<<endl;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | D - Line++ |
| ユーザ | kotatsugame |
| 言語 | C++14 (GCC 5.4.1) |
| 得点 | 400 |
| コード長 | 261 Byte |
| 結果 | AC |
| 実行時間 | 8 ms |
| メモリ | 256 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 400 / 400 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt |
| All | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 01_small_01.txt, 01_small_02.txt, 01_small_03.txt, 01_small_04.txt, 01_small_05.txt, 02_large_01.txt, 02_large_02.txt, 02_large_03.txt, 02_large_04.txt, 02_large_05.txt, 03_hand_01.txt, 03_hand_02.txt, 03_hand_03.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 00_sample_01.txt | AC | 1 ms | 256 KiB |
| 00_sample_02.txt | AC | 1 ms | 256 KiB |
| 00_sample_03.txt | AC | 1 ms | 256 KiB |
| 00_sample_04.txt | AC | 1 ms | 256 KiB |
| 01_small_01.txt | AC | 1 ms | 256 KiB |
| 01_small_02.txt | AC | 1 ms | 256 KiB |
| 01_small_03.txt | AC | 1 ms | 256 KiB |
| 01_small_04.txt | AC | 1 ms | 256 KiB |
| 01_small_05.txt | AC | 1 ms | 256 KiB |
| 02_large_01.txt | AC | 7 ms | 256 KiB |
| 02_large_02.txt | AC | 7 ms | 256 KiB |
| 02_large_03.txt | AC | 7 ms | 256 KiB |
| 02_large_04.txt | AC | 7 ms | 256 KiB |
| 02_large_05.txt | AC | 7 ms | 256 KiB |
| 03_hand_01.txt | AC | 8 ms | 256 KiB |
| 03_hand_02.txt | AC | 8 ms | 256 KiB |
| 03_hand_03.txt | AC | 7 ms | 256 KiB |