답안 #569521

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
569521 2022-05-27T13:04:20 Z niloyroot 자매 도시 (APIO20_swap) C++14
6 / 100
97 ms 12952 KB
#include <bits/stdc++.h>
using namespace std;
using ll = int; //long long;
using vi = vector<ll>;
using pl = pair<ll,ll>;
#define pb push_back
#define form(m,it) for(auto it=m.begin(); it!=m.end(); it++)
#define forp(i,a,b) for(ll i=a; i<=b; i++)
#define forn(i,a,b) for(ll i=a; i>=b; i--)
#define newl '\n'
#define ff first
#define ss second
const ll mod = 1000000007;
vi adj[100005];
bool g=0;
ll mx=-1;

void init(ll N, ll M, vector<ll> U, vector<ll> V, vector<ll> W){
    ll cnt[N+1]={0};
    
    for(auto u:U){
        cnt[u]++;
    }
    for(auto u:V){
        cnt[u]++;
    }
    for(auto u:W){
        mx=max(mx,u);
    }

    forp(i,0,N-1){
        if(cnt[i]!=2){
            g=1;
        }
    }
}
 
ll getMinimumFuelCapacity(ll X, ll Y){
    if(g){
        return -1;
    }
    return mx;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2644 KB Output is correct
2 Correct 1 ms 2644 KB Output is correct
3 Correct 2 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 2 ms 2644 KB Output is correct
6 Correct 2 ms 2644 KB Output is correct
7 Correct 2 ms 2644 KB Output is correct
8 Correct 2 ms 2644 KB Output is correct
9 Correct 26 ms 4860 KB Output is correct
10 Correct 32 ms 5204 KB Output is correct
11 Correct 31 ms 5188 KB Output is correct
12 Correct 33 ms 5364 KB Output is correct
13 Correct 33 ms 5364 KB Output is correct
14 Correct 31 ms 4812 KB Output is correct
15 Correct 87 ms 7016 KB Output is correct
16 Correct 87 ms 7024 KB Output is correct
17 Correct 85 ms 7156 KB Output is correct
18 Correct 90 ms 7124 KB Output is correct
19 Correct 52 ms 6428 KB Output is correct
20 Correct 89 ms 12404 KB Output is correct
21 Correct 90 ms 12732 KB Output is correct
22 Correct 97 ms 12952 KB Output is correct
23 Correct 91 ms 12896 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2644 KB Output is correct
2 Correct 1 ms 2644 KB Output is correct
3 Incorrect 81 ms 6872 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2644 KB Output is correct
2 Correct 1 ms 2644 KB Output is correct
3 Correct 2 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 2 ms 2644 KB Output is correct
6 Correct 2 ms 2644 KB Output is correct
7 Correct 2 ms 2644 KB Output is correct
8 Correct 2 ms 2644 KB Output is correct
9 Incorrect 2 ms 2644 KB Output isn't correct
10 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2644 KB Output is correct
2 Correct 1 ms 2644 KB Output is correct
3 Correct 2 ms 2644 KB Output is correct
4 Correct 2 ms 2644 KB Output is correct
5 Correct 2 ms 2644 KB Output is correct
6 Correct 2 ms 2644 KB Output is correct
7 Correct 2 ms 2644 KB Output is correct
8 Correct 2 ms 2644 KB Output is correct
9 Correct 26 ms 4860 KB Output is correct
10 Correct 32 ms 5204 KB Output is correct
11 Correct 31 ms 5188 KB Output is correct
12 Correct 33 ms 5364 KB Output is correct
13 Correct 33 ms 5364 KB Output is correct
14 Correct 31 ms 4812 KB Output is correct
15 Correct 87 ms 7016 KB Output is correct
16 Correct 87 ms 7024 KB Output is correct
17 Correct 85 ms 7156 KB Output is correct
18 Correct 90 ms 7124 KB Output is correct
19 Incorrect 81 ms 6872 KB Output isn't correct
20 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 2644 KB Output isn't correct
2 Halted 0 ms 0 KB -