Submission #935263

# Submission time Handle Problem Language Result Execution time Memory
935263 2024-02-29T01:55:50 Z wood Connecting Supertrees (IOI20_supertrees) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>  
using namespace std;
 
typedef long long ll;
typedef pair<int,int> p32;
typedef pair<ll,ll> p64;
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define MOD %1000000007

void build(vector<vector<int>> b);

int construct(vector<vector<int>> p){
    int n = p.size();
    vector<vector<int>> res;
    res.resize(n);
    for (size_t i = 0; i < n; i++)
    {
        res[i].resize(n);
    }
    
    for (size_t i = 1; i < n; i++)
    {
        res[0][i] = 1;
        res[i][0] = 1;
    }
    for (size_t i = 0; i < n-1; i++)
    {
        for (size_t j = 0; j < n-1; j++)
        {
            res[i+1][j+1] = 0;
        }
    }
    return 1;
    build(res);
}

#ifndef ONLINE_JUDGE
int main()
{
    fast_cin();
    
    return 0;
}
#endif

Compilation message

supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:20:26: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   20 |     for (size_t i = 0; i < n; i++)
      |                        ~~^~~
supertrees.cpp:25:26: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   25 |     for (size_t i = 1; i < n; i++)
      |                        ~~^~~
supertrees.cpp:30:26: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   30 |     for (size_t i = 0; i < n-1; i++)
      |                        ~~^~~~~
supertrees.cpp:32:30: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   32 |         for (size_t j = 0; j < n-1; j++)
      |                            ~~^~~~~
/usr/bin/ld: /tmp/cc4tRw9v.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccmiEh3u.o:supertrees.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status