結果

問題 No.1373 Directed Operations
ユーザー tailstails
提出日時 2021-02-05 21:37:47
言語 cLay
(20240104-1)
結果
AC  
実行時間 9 ms / 2,000 ms
コード長 195 bytes
コンパイル時間 6,021 ms
コンパイル使用メモリ 215,464 KB
実行使用メモリ 9,580 KB
最終ジャッジ日時 2023-09-19 02:07:58
合計ジャッジ時間 8,797 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,472 KB
testcase_01 AC 3 ms
7,496 KB
testcase_02 AC 6 ms
9,220 KB
testcase_03 AC 4 ms
8,296 KB
testcase_04 AC 5 ms
8,604 KB
testcase_05 AC 2 ms
7,480 KB
testcase_06 AC 7 ms
9,176 KB
testcase_07 AC 3 ms
7,556 KB
testcase_08 AC 3 ms
7,680 KB
testcase_09 AC 6 ms
8,968 KB
testcase_10 AC 5 ms
8,708 KB
testcase_11 AC 3 ms
7,740 KB
testcase_12 AC 6 ms
8,432 KB
testcase_13 AC 3 ms
7,580 KB
testcase_14 AC 9 ms
9,556 KB
testcase_15 AC 8 ms
9,240 KB
testcase_16 AC 9 ms
9,580 KB
testcase_17 AC 6 ms
8,800 KB
testcase_18 AC 5 ms
8,244 KB
testcase_19 AC 5 ms
8,124 KB
testcase_20 AC 5 ms
8,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int a[1d5],b[1d5],c[1d5];
{
	int@n;
	rd(a(n-1));
	rep(i,n-1)b[i]=i;
	sortA(n-1,a,b);
	rep(i,n-1){
		if(a[i]>i+1){
			wt("NO");
			exit(0);
		}
		c[b[i]]=i+2-a[i];
	}
	wt("YES");
	wtLn(c(n-1));
}
0