結果

問題 No.1373 Directed Operations
ユーザー tailstails
提出日時 2021-02-05 21:35:02
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 195 bytes
コンパイル時間 5,380 ms
コンパイル使用メモリ 216,044 KB
実行使用メモリ 9,504 KB
最終ジャッジ日時 2023-09-19 02:08:31
合計ジャッジ時間 8,402 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
7,476 KB
testcase_02 WA -
testcase_03 AC 4 ms
8,240 KB
testcase_04 AC 5 ms
8,640 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 7 ms
9,008 KB
testcase_10 AC 6 ms
8,720 KB
testcase_11 AC 3 ms
7,772 KB
testcase_12 AC 5 ms
8,412 KB
testcase_13 AC 3 ms
7,756 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

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+1-a[i];
	}
	wt("YES");
	wtLn(c(n-1));
}
0