結果

問題 No.1244 Black Segment
ユーザー tailstails
提出日時 2020-10-02 21:56:11
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 351 bytes
コンパイル時間 2,285 ms
コンパイル使用メモリ 165,868 KB
実行使用メモリ 11,528 KB
最終ジャッジ日時 2023-09-19 01:26:13
合計ジャッジ時間 6,741 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,444 KB
testcase_01 AC 2 ms
7,404 KB
testcase_02 AC 3 ms
7,428 KB
testcase_03 AC 2 ms
7,536 KB
testcase_04 AC 2 ms
7,412 KB
testcase_05 AC 2 ms
7,468 KB
testcase_06 AC 3 ms
7,436 KB
testcase_07 AC 2 ms
7,412 KB
testcase_08 AC 2 ms
7,408 KB
testcase_09 AC 2 ms
7,440 KB
testcase_10 AC 2 ms
7,444 KB
testcase_11 AC 2 ms
7,504 KB
testcase_12 AC 2 ms
7,444 KB
testcase_13 AC 2 ms
7,460 KB
testcase_14 AC 6 ms
8,900 KB
testcase_15 AC 3 ms
7,460 KB
testcase_16 AC 7 ms
9,012 KB
testcase_17 AC 3 ms
7,452 KB
testcase_18 AC 7 ms
10,724 KB
testcase_19 AC 9 ms
11,480 KB
testcase_20 AC 12 ms
11,312 KB
testcase_21 AC 9 ms
11,060 KB
testcase_22 AC 12 ms
11,336 KB
testcase_23 AC 11 ms
11,280 KB
testcase_24 AC 11 ms
11,348 KB
testcase_25 AC 11 ms
11,384 KB
testcase_26 AC 11 ms
11,232 KB
testcase_27 WA -
testcase_28 AC 12 ms
11,472 KB
testcase_29 AC 11 ms
11,252 KB
testcase_30 AC 11 ms
11,528 KB
testcase_31 AC 12 ms
11,384 KB
testcase_32 AC 13 ms
11,380 KB
testcase_33 AC 13 ms
11,488 KB
testcase_34 AC 10 ms
11,396 KB
testcase_35 AC 9 ms
11,296 KB
testcase_36 AC 9 ms
11,376 KB
testcase_37 AC 9 ms
11,520 KB
testcase_38 AC 9 ms
11,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int n,m,a,b,x,y,l[1d5],r[1d5],c[1d5];
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