結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
7,524 KB
testcase_02 WA -
testcase_03 AC 3 ms
8,248 KB
testcase_04 AC 5 ms
8,588 KB
testcase_05 AC 2 ms
7,500 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 6 ms
9,104 KB
testcase_10 AC 5 ms
8,716 KB
testcase_11 AC 3 ms
7,716 KB
testcase_12 AC 5 ms
8,340 KB
testcase_13 AC 3 ms
7,576 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(a(n-1));
}
0