Submission #613563

#TimeUsernameProblemLanguageResultExecution timeMemory
613563PanTkdConnecting Supertrees (IOI20_supertrees)C++14
Compilation error
0 ms0 KiB
// // main.cpp // // Created by Panagiotis Chadjicostas on // Copyright © Panagiotis Hadjicostas. All rights reserved. // #include "supertrees.h" #include <iostream> #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <fstream> #include <iomanip> #include <iterator> #include <limits> #include <list> #include <cstring> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #include <unordered_map> using namespace std; typedef long long ll; typedef vector<ll> vi; typedef pair<ll,ll> ii; #define fo(i,a,b) for(int i = a; i<=b; i++) #define f(i,b) for(int i=0;i<b;i++) #define F first #define S second #define sz size #define ls s,m,idx<<1 #define rs m+1,e,idx<<1|1 const ll MOD=ll(1e9)+7; const ll MAXN=2*ll(1e6); void checker(){ ll n=rand()%20+2; vi a(n,ll()); for(ll i=0;i<n;i++){ a[i]=rand()%20+2; } for(ll b=0;b<(1<<n);b++){ vi on,off; for(ll i=0;i<n;i++){ if(i&(1<<i)){ on.push_back(i); } else{ off.push_back(i); } } } } /////////////////////////////////////////////////////////////////////// void build(vector<vector<ll> > b){ for(ll i=0;i<b.size();i++){ for(ll j=0;j<b[i].size();j++) cout<<b[i][j]<<' '; cout<<endl; } } int construct(vector<vector<ll> > p) { ll s=0; ll n=p[s].size(); vector<vector<ll> > b; b.assign(n,vi(n,0)); for(ll i=0;i<n;i++){ for(ll j=0;j<n;j++){ if(j==s) if(i!=s){ b[i][j]=1; b[j][i]=1; } } } build(b); return 1; }

Compilation message (stderr)

supertrees.cpp: In function 'void build(std::vector<std::vector<long long int> >)':
supertrees.cpp:63:17: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<std::vector<long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   63 |     for(ll i=0;i<b.size();i++){
      |                ~^~~~~~~~~
supertrees.cpp:64:21: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   64 |         for(ll j=0;j<b[i].size();j++)
      |                    ~^~~~~~~~~~~~
/usr/bin/ld: /tmp/ccI1Nr0i.o: in function `main':
grader.cpp:(.text.startup+0x38a): undefined reference to `construct(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >)'
collect2: error: ld returned 1 exit status