Submission #1038299

#TimeUsernameProblemLanguageResultExecution timeMemory
10382990pt1mus23Bank (IZhO14_bank)C++14
Compilation error
0 ms0 KiB
#pragma GCC optimize("O3", "inline") #include <bits/stdc++.h> using namespace std; #ifndef ONLINE_JUDGE #include "0pt1z.hpp" #else #define dbg(...) #endif mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); #define ins insert #define pb push_back #define int long long int #define pii pair<int, int> #define endl '\n' #define drop(x) cout<<(x)<<endl; return; #define all(x) x.begin(),x.end() #define hash z0hashp #define div z0dvp const int mod = 1e9 +7, sze = 1e5 +10, inf = LLONG_MAX, P = 1453; void opt1z(){ int n,m; cin>>n>>m; vector<int> people(n); for(int i=0;i<n;i++){ cin>>people[i]; } vector<int> notes(m); for(int j=0;j<m;j++){ cin>>notes[j]; } vector<int> left((1<<m),-1); vector<int> cover((1<<m),-1); left[0]=0; cover[0]=0; for(int i=0;i<(1<<m);i++){ for(int j=0;j<m;j++){ if(i & (1<<j)){ int prev = (i & ~(1<<j)); if(cover[prev]==-1){ continue; } int nw = left[prev] + notes[j]; int tar = people[cover[prev]]; if(nw<tar){ cover[i]=cover[prev]; left[i]=nw; } else if(nw==tar){ cover[i]=cover[prev]+1; left[i]=0; } } } if(cover[i]==n){ drop("YES"); } } drop("NO"); } signed main() { cin.tie(0)->sync_with_stdio(0); int tt = 1; // cin>>tt; while(tt--){ opt1z(); } return 0; }

Compilation message (stderr)

bank.cpp:7:10: fatal error: 0pt1z.hpp: No such file or directory
    7 | #include "0pt1z.hpp"
      |          ^~~~~~~~~~~
compilation terminated.