# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
630089 | 2022-08-15 16:29:30 | JustInCase | 메기 농장 (IOI22_fish) | C++17 | 컴파일 에러 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <array>
#include <algorithm>
#include <numeric>
#include <map>
#include <unordered_map>
#include <set>
#include <cstring>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <random>
#include <cstdlib>
#define debug(x) std::cout << #x << " " << (x) << '\n';
#define pb push_back
#define mp std::make_pair
#define remax(a, b) a = std::max((a), (b));
#define remin(a, b) a = std::min((a), (b));
#define maxWeights max_weights
int64_t solveSmallN(int32_t n, int32_t m, std::vector<int32_t> x, std::vector<int32_t> y,
std::vector<int32_t> w) {
const int32_t MAX_N = 300;
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
컴파일 시 표준 에러 (stderr) 메시지
fish.cpp: In function 'int64_t solveMediumN(int32_t, int32_t, std::vector<int>, std::vector<int>, std::vector<int>)': fish.cpp:182:27: error: 'n' is not a constant expression 182 | std::array<int64_t, n + 1> dpIncr{}, dpDecr{}, nDpIncr{}, nDpDecr{}; | ^ fish.cpp:182:24: note: in template argument for type 'long unsigned int' 182 | std::array<int64_t, n + 1> dpIncr{}, dpDecr{}, nDpIncr{}, nDpDecr{}; | ~~^~~ fish.cpp:186:11: error: invalid types 'int[int32_t {aka int}]' for array subscript 186 | nDpIncr[k] = dpDecr[0]; | ^ fish.cpp:186:23: error: invalid types 'int[int]' for array subscript 186 | nDpIncr[k] = dpDecr[0]; | ^ fish.cpp:188:18: error: invalid types 'int[int32_t {aka int}]' for array subscript 188 | remax(nDpIncr[k], dpIncr[lastK] + getWRangeSum(lastK, k, j - 1)); | ^ fish.cpp:22:21: note: in definition of macro 'remax' 22 | #define remax(a, b) a = std::max((a), (b)); | ^ fish.cpp:188:18: error: invalid types 'int[int32_t {aka int}]' for array subscript 188 | remax(nDpIncr[k], dpIncr[lastK] + getWRangeSum(lastK, k, j - 1)); | ^ fish.cpp:22:35: note: in definition of macro 'remax' 22 | #define remax(a, b) a = std::max((a), (b)); | ^ fish.cpp:188:29: error: invalid types 'int[int32_t {aka int}]' for array subscript 188 | remax(nDpIncr[k], dpIncr[lastK] + getWRangeSum(lastK, k, j - 1)); | ^ fish.cpp:22:40: note: in definition of macro 'remax' 22 | #define remax(a, b) a = std::max((a), (b)); | ^ fish.cpp:191:11: error: invalid types 'int[int32_t {aka int}]' for array subscript 191 | nDpDecr[k] = 0; | ^ fish.cpp:193:18: error: invalid types 'int[int32_t {aka int}]' for array subscript 193 | remax(nDpDecr[k], dpDecr[lastK] + getWRangeSum(k, lastK, j)); | ^ fish.cpp:22:21: note: in definition of macro 'remax' 22 | #define remax(a, b) a = std::max((a), (b)); | ^ fish.cpp:193:18: error: invalid types 'int[int32_t {aka int}]' for array subscript 193 | remax(nDpDecr[k], dpDecr[lastK] + getWRangeSum(k, lastK, j)); | ^ fish.cpp:22:35: note: in definition of macro 'remax' 22 | #define remax(a, b) a = std::max((a), (b)); | ^ fish.cpp:193:29: error: invalid types 'int[int32_t {aka int}]' for array subscript 193 | remax(nDpDecr[k], dpDecr[lastK] + getWRangeSum(k, lastK, j)); | ^ fish.cpp:22:40: note: in definition of macro 'remax' 22 | #define remax(a, b) a = std::max((a), (b)); | ^ fish.cpp:194:18: error: invalid types 'int[int32_t {aka int}]' for array subscript 194 | remax(nDpDecr[k], dpIncr[lastK] + getWRangeSum(k, lastK, j)); | ^ fish.cpp:22:21: note: in definition of macro 'remax' 22 | #define remax(a, b) a = std::max((a), (b)); | ^ fish.cpp:194:18: error: invalid types 'int[int32_t {aka int}]' for array subscript 194 | remax(nDpDecr[k], dpIncr[lastK] + getWRangeSum(k, lastK, j)); | ^ fish.cpp:22:35: note: in definition of macro 'remax' 22 | #define remax(a, b) a = std::max((a), (b)); | ^ fish.cpp:194:29: error: invalid types 'int[int32_t {aka int}]' for array subscript 194 | remax(nDpDecr[k], dpIncr[lastK] + getWRangeSum(k, lastK, j)); | ^ fish.cpp:22:40: note: in definition of macro 'remax' 22 | #define remax(a, b) a = std::max((a), (b)); | ^ fish.cpp:202:24: error: invalid types 'int[int]' for array subscript 202 | return std::max(dpIncr[0], dpDecr[0]); | ^ fish.cpp:202:35: error: invalid types 'int[int]' for array subscript 202 | return std::max(dpIncr[0], dpDecr[0]); | ^