Submission #434415

#TimeUsernameProblemLanguageResultExecution timeMemory
434415OttoTheDinoDetecting Molecules (IOI16_molecules)C++17
Compilation error
0 ms0 KiB
#include "molecules.h" #include <bits/stdc++.h> using namespace std; #define rep(i,s,e) for (int i = s; i <= e; ++i) #define rrep(i,s,e) for (int i = s; i >= e; --i) #define pb push_back #define pf push_front #define fi first #define se second #define all(a) a.begin(), a.end() typedef long long ll; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<int> vi; typedef vector<double> vd; typedef vector<string> vs; typedef vector<char> vc; typedef vector<ll> vll; vi find_subset(int l, int u, vi w) { bool dp[2][u+1] = {}; vi dpc[2][u+1] = {}; dp[1][0] = 1; rep (i,0,(int)w.size()-1) { rep (j,0,u) { dp[i%2][u] = 0; dpc[i%2][u].clear(); } rep (j,1,u) { if (j-w[i]>=0 && dp[(i%2)^1][j-w[i]]) { dpc[i%2][j].pb(i); dp[i%2][j] = 1; } } } rep (i,l,u) if (dp[((int)w.size()%2)^1][i]) return dpc[((int)w.size()%2)^1][i]; return vector<int>(); }

Compilation message (stderr)

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