제출 #658163

#제출 시각아이디문제언어결과실행 시간메모리
658163stevancv삶의 질 (IOI10_quality)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "quality.h" #define ll long long #define ld long double #define sp ' ' #define en '\n' #define smin(a, b) a = min(a, b) #define smax(a, b) a = max(a, b) using namespace std; const int N = 3e3 + 2; const int inf = 2e9; int rectangle(int n, int m, int h, int w, int q[3000][3000]) { vector<vector<int>> a(n + 1, vector<int>(m + 1)); for (int i = 1; i <= n; i++) { for (int j = 1; j <= m; j++) { a[i][j] = q[i - 1][j - 1]; } } int l = 1, r = n * m, ans = n * m; while (l <= r) { int mid = l + r >> 1; /*if (Can(mid)) { r = mid - 1; ans = mid; } else l = mid + 1;*/ } return ans; }

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

quality.cpp: In function 'int rectangle(int, int, int, int, int (*)[3000])':
quality.cpp:21:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   21 |         int mid = l + r >> 1;
      |                   ~~^~~
quality.cpp:21:13: warning: unused variable 'mid' [-Wunused-variable]
   21 |         int mid = l + r >> 1;
      |             ^~~
/usr/bin/ld: /tmp/ccMEbSK8.o: in function `main':
grader.cpp:(.text.startup+0xe9): undefined reference to `rectangle(int, int, int, int, int (*) [3001])'
collect2: error: ld returned 1 exit status