# 東京大学プログラミングコンテスト2014

## Submission #6919890

### Source codeソースコード

```int N;
int D;
vector<int> E;
int ng,ml;

void dfs(int cur,int dep) {
int i;
D[cur]=dep;
FORR(r,E[cur]) {
if(D[r]==-1) dfs(r,dep+1);
else if(D[r]<D[cur]-1) ml=max(ml,(D[cur]+1-D[r]));
}
}

void solve() {
int i,j,k,l,r,x,y; string s;
cin>>N;

FOR(i,N) {
cin>>x>>y;
E[x-1].push_back(y-1);
E[y-1].push_back(x-1);
}
MINUS(D);
dfs(0,0);

_P("%d %d\n",1+(ml==N),N-(ml%2));
}```

### Submission

Task問題 C - 最小カットと最大カット tsb2b 2019/08/15 10:03:56 +0000 C++14 (GCC 5.4.1) CE - 433 Byte - -

### Compiler messageコンパイルメッセージ

./Main.cpp:3:1: error: ‘vector’ does not name a type
vector<int> E;
^
./Main.cpp: In function ‘void dfs(int, int)’:
./Main.cpp:9:7: error: ‘r’ was not declared in this scope
FORR(r,E[cur]) {
^
./Main.cpp:9:9: error: ‘E’ was not declared in this scope
FORR(r,E[cur]) {
^
./Main.cpp:9:15: error: ‘FORR’ was not declared in this scope
FORR(r,E[cur]) {
^
./Main.cpp: In function ‘void solve()’:
./Main.cpp:16:21: error: ‘string’ was not declared in this scope
int i,j,k,l,r,x,y; string s;
^
./Main.cpp:17:2: error: ‘cin’ was not declared in this scope
cin>>N;
^
./Main.cpp:19:9: error: ‘FOR’ was not declared in this scope
FOR(i,N) {
^
./Main.cpp:24:9: error: ‘MINUS’ was not declared in this scope
MINUS(D);
^
./Main.cpp:27:33: error: ‘_P’ was not declared in this scope
_P("%d %d\n",1+(ml==N),N-(ml%2));
^