結果

問題 No.1244 Black Segment
ユーザー tailstails
提出日時 2020-10-02 21:57:32
言語 cLay
(20240104-1)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 353 bytes
コンパイル時間 2,977 ms
コンパイル使用メモリ 165,616 KB
実行使用メモリ 11,548 KB
最終ジャッジ日時 2023-09-19 01:26:30
合計ジャッジ時間 4,771 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,412 KB
testcase_01 AC 3 ms
7,412 KB
testcase_02 AC 3 ms
7,436 KB
testcase_03 AC 2 ms
7,680 KB
testcase_04 AC 3 ms
7,412 KB
testcase_05 AC 3 ms
7,428 KB
testcase_06 AC 2 ms
7,416 KB
testcase_07 AC 2 ms
7,420 KB
testcase_08 AC 2 ms
7,432 KB
testcase_09 AC 2 ms
7,416 KB
testcase_10 AC 2 ms
7,520 KB
testcase_11 AC 2 ms
7,548 KB
testcase_12 AC 2 ms
7,504 KB
testcase_13 AC 3 ms
7,468 KB
testcase_14 AC 7 ms
8,900 KB
testcase_15 AC 3 ms
7,468 KB
testcase_16 AC 7 ms
9,020 KB
testcase_17 AC 3 ms
7,448 KB
testcase_18 AC 8 ms
10,692 KB
testcase_19 AC 10 ms
11,352 KB
testcase_20 AC 12 ms
11,508 KB
testcase_21 AC 9 ms
11,056 KB
testcase_22 AC 12 ms
11,336 KB
testcase_23 AC 11 ms
11,388 KB
testcase_24 AC 12 ms
11,360 KB
testcase_25 AC 11 ms
11,412 KB
testcase_26 AC 12 ms
11,328 KB
testcase_27 AC 10 ms
11,356 KB
testcase_28 AC 13 ms
11,548 KB
testcase_29 AC 11 ms
11,228 KB
testcase_30 AC 11 ms
11,304 KB
testcase_31 AC 13 ms
11,400 KB
testcase_32 AC 13 ms
11,448 KB
testcase_33 AC 13 ms
11,388 KB
testcase_34 AC 10 ms
11,532 KB
testcase_35 AC 9 ms
11,344 KB
testcase_36 AC 10 ms
11,444 KB
testcase_37 AC 10 ms
11,532 KB
testcase_38 AC 9 ms
11,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int n,m,a,b,x,y,l[1d5],r[1d5],c[1d5+1];
graph g;
deque<int> q;
{
	rd(n,m,a,b,(l--,r)(m));
	g.setEdge(n+1,m,l,r);
	rep(i,a){
		c[i]=1;
		q.push_back(i);
	}
	while(!q.empty()){
		x=q.front();
		q.pop_front();
		if(x>=b){
			wt(c[x]-1);
			exit(0);
		}
		rep[g.edge[x]](y,g.es[x]){
			if(!c[y]){
				c[y]=c[x]+1;
				q.push_back(y);
			}
		}
	}
	wt(-1);
}
0