結果

問題 No.479 頂点は要らない
ユーザー FF256grhyFF256grhy
提出日時 2017-01-27 23:37:59
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 78 ms / 1,500 ms
コード長 312 bytes
コンパイル時間 2,422 ms
コンパイル使用メモリ 145,640 KB
実行使用メモリ 8,236 KB
最終ジャッジ日時 2023-08-25 11:04:16
合計ジャッジ時間 5,401 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
5,708 KB
testcase_01 AC 4 ms
5,776 KB
testcase_02 AC 3 ms
6,012 KB
testcase_03 AC 3 ms
5,828 KB
testcase_04 AC 4 ms
5,756 KB
testcase_05 AC 4 ms
5,744 KB
testcase_06 AC 3 ms
5,844 KB
testcase_07 AC 3 ms
5,672 KB
testcase_08 AC 4 ms
5,656 KB
testcase_09 AC 3 ms
5,832 KB
testcase_10 AC 3 ms
5,900 KB
testcase_11 AC 3 ms
5,768 KB
testcase_12 AC 3 ms
5,676 KB
testcase_13 AC 3 ms
5,712 KB
testcase_14 AC 3 ms
5,764 KB
testcase_15 AC 4 ms
5,848 KB
testcase_16 AC 3 ms
5,828 KB
testcase_17 AC 4 ms
5,900 KB
testcase_18 AC 3 ms
5,772 KB
testcase_19 AC 4 ms
5,708 KB
testcase_20 AC 4 ms
5,720 KB
testcase_21 AC 4 ms
5,688 KB
testcase_22 AC 4 ms
5,716 KB
testcase_23 AC 4 ms
5,784 KB
testcase_24 AC 4 ms
5,744 KB
testcase_25 AC 4 ms
5,696 KB
testcase_26 AC 77 ms
8,236 KB
testcase_27 AC 78 ms
8,188 KB
testcase_28 AC 60 ms
6,180 KB
testcase_29 AC 64 ms
7,172 KB
testcase_30 AC 64 ms
7,192 KB
testcase_31 AC 63 ms
7,156 KB
testcase_32 AC 63 ms
7,488 KB
testcase_33 AC 61 ms
7,108 KB
testcase_34 AC 66 ms
7,184 KB
testcase_35 AC 60 ms
6,700 KB
testcase_36 AC 35 ms
6,212 KB
testcase_37 AC 67 ms
7,272 KB
testcase_38 AC 57 ms
7,280 KB
testcase_39 AC 41 ms
7,056 KB
testcase_40 AC 48 ms
7,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define D(i,x)for(int i=x;i--;)
using namespace std;
int n,m,u[100000],a,b,f;
vector<int>d[100000];
int main(){
	cin>>n>>m;
	D(i,m){
		cin>>a>>b;
		u[a]++;
		d[b].push_back(a);
	}
	D(i,n)
		if(u[i]){
			f=1;
			cout<<1;
			D(j,d[i].size())u[d[i][j]]--;
		}else if(f)cout<<0;
	return 0;
}
0