답안 #1081936

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1081936 2024-08-30T13:02:04 Z ALeonidou 분수 공원 (IOI21_parks) C++17
0 / 100
1 ms 348 KB
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;

#define ll int
#define F first
#define S second
#define pb push_back
#define sz(x) (ll)x.size()

typedef vector <ll> vi;
typedef pair <ll,ll> ii;
typedef vector <ii> vii;

#define dbg(x) cout<<#x<<": "<<x<<endl;
#define dbg2(x,y) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl;
#define dbg3(x,y,z) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl;

void printVct(vi &v){
    for (ll i =0; i<sz(v); i++){
        cout<<v[i]<<" ";
    }
    cout<<endl;
}

int construct_roads(vi x, vi y) {
    ll n = sz(x);
    sort(y.begin(), y.end());
    vi u,v,a,b;
    for (ll i= 0; i<n-1; i++){
        if (y[i] != y[i+1] - 2){
            return 0;
        }
        u.pb(y[i]);
        v.pb(y[i+1]);
        a.pb(1);
        b.pb(y[i]+1);
    }
    build(u, v, a, b);
    return 1;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Integer parameter [name=u[j]] equals to 2, violates the range [0, 1]
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Integer parameter [name=u[j]] equals to 2, violates the range [0, 1]
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Integer parameter [name=u[j]] equals to 2, violates the range [0, 1]
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Integer parameter [name=u[j]] equals to 2, violates the range [0, 1]
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Integer parameter [name=u[j]] equals to 2, violates the range [0, 1]
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Integer parameter [name=u[j]] equals to 2, violates the range [0, 1]
3 Halted 0 ms 0 KB -