LL solve() { int n; getint2(m, n); ans = 0; for(int i = 0; i < n; i++) { getint2(k[i], l[i]); k[i] = k[i] - l[i] + 1; for (int j = 0; j < l[i] - 1; j++) { int x; getint(x); } for (int j = 0; j < k[i]; j++) { getint(a[i][j]); } for (int j = 0; j < l[i] - 1; j++) { int x; getint(x); } for (int j = 0; j < k[i] - 1; j++) { getint(c[i][j]); } } for (int i = 0; i < (1 << n); i++) { if (__builtin_popcount(i) != 8) continue; int s = i; vector<int> l, r; for (int j = 0; j < n; j++) { if (s & 1) { if (l.size() != 4) l.pb(j); else r.pb(j); } s >>= 1; } solve(l, lans); solve(r, rans); if (rans.empty()) continue; for (map<int, LL>::iterator it = lans.begin(); it != lans.end(); it++) { if (m - it->c0 < 0) break; map<int, LL>::iterator rit = rans.upper_bound(m - it->c0); if (rit == rans.begin()) break; rit--; chkmax(ans, it->c1 + rit->c1); } } return ans; }
static UINT32 getpos(const OEMCHAR *str) { UINT m; UINT s; UINT f; if ((getint2(str + 0, &m) != SUCCESS) || (str[2] != ':') || (getint2(str + 3, &s) != SUCCESS) || (str[5] != ':') || (getint2(str + 6, &f) != SUCCESS)) { return(0); } return((((m * 60) + s) * 75) + f); }
//-------------------------------------------------------------------------- int idaapi rpc_debmod_t::dbg_thread_set_step(thid_t tid) { return getint2(RPC_TH_SET_STEP, tid); }
//-------------------------------------------------------------------------- int idaapi rpc_debmod_t::dbg_thread_continue(thid_t tid) { return getint2(RPC_TH_CONTINUE, tid); }
//-------------------------------------------------------------------------- int idaapi rpc_debmod_t::dbg_thread_suspend(thid_t tid) { return getint2(RPC_TH_SUSPEND, tid); }
//-------------------------------------------------------------------------- int rpc_debmod_t::dbg_init(bool _debug_debugger) { has_pending_event = false; poll_debug_events = false; return getint2(RPC_INIT, _debug_debugger); }