답안 #804047

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
804047 2023-08-03T06:58:20 Z moel_solution(#10136) Fun Palace (CCO18_fun) C++17
3 / 25
1 ms 384 KB
#include<iostream>
#include<vector>
#include<algorithm>
#define ep emplace
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
typedef pair<int,int>pi;
typedef pair<ll,ll>pl;
const int inf=1e9+7;
const ll INF=1e18;
int dp[1010];
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int n,e;
    cin>>n;
    cin>>e;
    vector<pi>v(n-1);
    for(pi&t:v)
        cin>>t.fi>>t.se;
    cout<<max(e-1,e==1?n/2:(n+1)/2)<<endl;
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 216 KB Output is correct
3 Correct 1 ms 216 KB Output is correct
4 Correct 1 ms 216 KB Output is correct
5 Correct 0 ms 216 KB Output is correct
6 Correct 0 ms 216 KB Output is correct
7 Correct 1 ms 216 KB Output is correct
8 Correct 0 ms 216 KB Output is correct
9 Correct 1 ms 216 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 216 KB Output is correct
2 Correct 1 ms 216 KB Output is correct
3 Correct 0 ms 216 KB Output is correct
4 Correct 0 ms 216 KB Output is correct
5 Correct 0 ms 216 KB Output is correct
6 Correct 1 ms 216 KB Output is correct
7 Incorrect 1 ms 216 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 216 KB Output is correct
3 Correct 1 ms 216 KB Output is correct
4 Correct 1 ms 216 KB Output is correct
5 Correct 0 ms 216 KB Output is correct
6 Correct 0 ms 216 KB Output is correct
7 Correct 1 ms 216 KB Output is correct
8 Correct 0 ms 216 KB Output is correct
9 Correct 1 ms 216 KB Output is correct
10 Correct 1 ms 216 KB Output is correct
11 Incorrect 1 ms 212 KB Output isn't correct
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 384 KB Output is correct
2 Correct 0 ms 216 KB Output is correct
3 Correct 1 ms 216 KB Output is correct
4 Correct 1 ms 216 KB Output is correct
5 Correct 0 ms 216 KB Output is correct
6 Correct 0 ms 216 KB Output is correct
7 Correct 1 ms 216 KB Output is correct
8 Correct 0 ms 216 KB Output is correct
9 Correct 1 ms 216 KB Output is correct
10 Correct 1 ms 216 KB Output is correct
11 Correct 1 ms 216 KB Output is correct
12 Correct 0 ms 216 KB Output is correct
13 Correct 0 ms 216 KB Output is correct
14 Correct 0 ms 216 KB Output is correct
15 Correct 1 ms 216 KB Output is correct
16 Incorrect 1 ms 216 KB Output isn't correct
17 Halted 0 ms 0 KB -