답안 #935262

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
935262 2024-02-29T01:54:47 Z wood 슈퍼트리 잇기 (IOI20_supertrees) C++17
컴파일 오류
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;
        }
    }
    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++)
      |                            ~~^~~~~
supertrees.cpp:38:1: warning: no return statement in function returning non-void [-Wreturn-type]
   38 | }
      | ^
/usr/bin/ld: /tmp/ccXEBAwg.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccVT1gDh.o:supertrees.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status