답안 #751727

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
751727 2023-06-01T10:25:44 Z stevancv Logičari (COCI21_logicari) C++14
컴파일 오류
0 ms 0 KB
/*#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define sp ' '
#define en '\n'
#define smin(a, b) a = min(a, b)
#define smax(a, b) a = max(a, b)
using namespace std;
const int N = 1e5 + 2;
const int inf = 2e9;
struct Dsu {
    int p[N];
    void Init(int n) {
        for (int i = 1; i <= n; i++) p[i] = i;
    }
    int Find(int x) {
        if (x == p[x]) return x;
        return p[x] = Find(p[x]);
    }
    void Unite(int u, int v) {
        u = Find(u); v = Find(v);
        p[v] = u;
    }
}dsu;
vector<int> g[N];
int sta[N], col[N];
int dp[N][2][2];
void Resi(int s, int e) {

}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n; cin >> n;
    dsu.Init(n);
    int A, B; A = B = 0;
    for (int i = 0; i < n; i++) {
        int u, v;
        cin >> u >> v;
        if (dsu.Find(u) != dsu.Find(v)) {
            g[u].push_back(v);
            g[v].push_back(u);
        }
        else {
            A = u;
            B = v;
        }
    }
    for (int i = 1; i <= n; i++) {
        sta[i] = 1; col[i] = 2;
    }
    for (int i = 1; i <= n; i++) for (int j = 0; j < 4; j++) dp[i][j / 2][j % 2] = inf;
    col[A] = col[B] = 0;
    int ans = Resi(1, 0);
    for (int i = 1; i <= n; i++) for (int j = 0; j < 4; j++) dp[i][j / 2][j % 2] = inf;
    col[B] = 1; sta[A] = 0;
    smin(ans, Resi(1, 0));
    for (int i = 1; i <= n; i++) for (int j = 0; j < 4; j++) dp[i][j / 2][j % 2] = inf;
    col[A] = 1; sta[B] = 0;
    smin(ans, Resi(1, 0));
    for (int i = 1; i <= n; i++) for (int j = 0; j < 4; j++) dp[i][j / 2][j % 2] = inf;
    col[B] = 0; sta[A] = 1;
    smin(ans, Resi(1, 0));
    if (ans == inf) ans = -1;
    cout << ans << en;
    return 0;
}
*/

Compilation message

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status