제출 #1005379

#제출 시각아이디문제언어결과실행 시간메모리
1005379SulA캥거루 (CEOI16_kangaroo)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; const int MOD = 1e9+7; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int N,cs,cf; cin >> N >> cs >> cf; --cs, --cf; long long dp[2][N+1][N][N] = {}; dp[0][1][0][0] = dp[1][1][0][0] = 1; for (int n = 2; n <= N; n++) { for (int s = 0; s < n; s++) { for (int f = 0; f < n; f++) { if (s == f) continue; // finding dp[0][...] // 0 = right-to-left // 1 = left-to-right for (int p = s+1; p < n; p++) { (dp[0][n][s][f] += dp[1][n-1][p-1][f-(f > s)]) %= MOD; } for (int p = s-1; p >= 0; p--) { (dp[1][n][s][f] += dp[0][n-1][p][f-(f > s)]) %= MOD; } } } } cout << (dp[0][N][cs][cf] + dp[0][N][cs][cf]) % MOD; }

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

during RTL pass: expand
kangaroo.cpp: In function 'int main()':
kangaroo.cpp:12:15: internal compiler error: in make_decl_rtl, at varasm.c:1342
   12 |     long long dp[2][N+1][N][N] = {};
      |               ^~
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.