제출 #1184900

#제출 시각아이디문제언어결과실행 시간메모리
1184900islam_2010슈퍼트리 잇기 (IOI20_supertrees)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "supertrees.h" #define all(x) x.begin(), x.end() #define int long long #define pii pair<int, int> using namespace std; const int sz = 1e5 + 5; const int mod = 1e9+7; int binpow(int x, int n){ int res = 1; n%=mod; while (n > 0){ if(n&1){ res = res * x % mod; }x = x * x % mod; n/=2; }return res; } int gcd(int a, int b){ if(b == 0){ return a; } return gcd(b, a % b); } bool is_prime(int n){ if(n==1){ return false; }if(n==2){ return true; } for(int i = 2; i * i <= n; i++){ if(n%i==0){ return false; } }return true; } int construct(vector<vector<int>> p){ int n = p.size(); bool flag=true; for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ if(p[i][j]!='1'){ flag=false; break; } }if(!flag){ break; } }if(flag){ return 1; } } // signed main() { // ios_base::sync_with_stdio(false); // cin.tie(0); // return 0; // }

컴파일 시 표준 에러 (stderr) 메시지

supertrees.cpp: In function 'long long int construct(std::vector<std::vector<long long int> >)':
supertrees.cpp:60:1: warning: control reaches end of non-void function [-Wreturn-type]
   60 | }
      | ^
/usr/bin/ld: /tmp/cc04cqWY.o: in function `main':
grader.cpp:(.text.startup+0x383): 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