제출 #287645

#제출 시각아이디문제언어결과실행 시간메모리
287645fgojko삶의 질 (IOI10_quality)C++14
컴파일 에러
0 ms0 KiB
#include <iostream> #include <vector> #include <algorithm> //#define FEEDBACK using namespace std; typedef unsigned long long ull; int rectangle(int n, int m, int x, int y, int** mat){ vector<ull> vec; int max = n*m; for(int i = 0; i <= n-x; ++i){ for(int j = 0; j <= m-y; ++j){ vec.resize(0); for(int a = i; a < i+x; ++a){ for(int b =j; b < j+y; ++b){ vec.push_back(mat[a][b]); } } sort(vec.begin(), vec.end()); #ifdef FEEDBACK cout << "( " << i << ", " << j << " )\n"; cout << "median = " << vec[vec.size()/2] << endl; #endif // FEEDBACK if(max > vec[vec.size()/2]){ max = vec[vec.size()/2]; } } } return max; }

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

quality.cpp: In function 'int rectangle(int, int, int, int, int**)':
quality.cpp:27:20: warning: comparison of integer expressions of different signedness: 'int' and '__gnu_cxx::__alloc_traits<std::allocator<long long unsigned int>, long long unsigned int>::value_type' {aka 'long long unsigned int'} [-Wsign-compare]
   27 |             if(max > vec[vec.size()/2]){
/tmp/ccXJIpYI.o: In function `main':
grader.cpp:(.text.startup+0xcd): undefined reference to `rectangle(int, int, int, int, int (*) [3001])'
collect2: error: ld returned 1 exit status