Submission #1107694

# Submission time Handle Problem Language Result Execution time Memory
1107694 2024-11-02T01:42:09 Z ozner77 Parachute rings (IOI12_rings) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;
vector<vector<long long>> V;
vector<long long> sumas;
void Init(long long N){
    vector<long long> V1(N,0);
    for(int i=0;i<N;i++){
        V.push_back(V1);
    }
}
void Link(long long A,long long B){
    V[A][B]=1;
    V[B][A]=1;
    sumas[A]++;
    sumas[B]++;
}
long long CountCritical(){
    long long critical=0;
    long long jaja=V.size();
    for(int i=0;i<jaja;i++){
        bool es=true;
        for(int j=0;j<jaja;j++){
            if(i!=j){
                if(V[j][i]==1){
                    if(sumas[j]-1>2){
                        es=false;
                        break;
                    }
                }else{
                    if(sumas[j]>2){
                        es=false;
                        break;
                    }
                }
            }
        }
        if(es){
            critical++;
        }
    }
    return critical;
}

Compilation message

/usr/bin/ld: /tmp/cc6mxrpA.o: in function `main':
grader.cpp:(.text.startup+0x88): undefined reference to `Init(int)'
/usr/bin/ld: grader.cpp:(.text.startup+0xca): undefined reference to `Link(int, int)'
collect2: error: ld returned 1 exit status