제출 #344528

#제출 시각아이디문제언어결과실행 시간메모리
344528mansur은행 (IZhO14_bank)C++14
0 / 100
1 ms384 KiB
#include<bits/stdc++.h> using namespace std; #pragma optimize ("g",on) #pragma GCC target ("avx2") #pragma GCC optimize ("Ofast") #pragma GCC optimize ("unroll-loops") #pragma GCC target ("avx,avx2,fma") #pragma GCC optimize ("03") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define all(a) a.begin(),a.end() #define ll long long #define pb push_back #define nl '\n' #define popb pop_back() #define sz size() #define ld long double #define ull unsigned long long #define F first #define S second #define fix fixed<<setprecision #define pii pair<int,int> #define E exit (0) #define int1 long long const int inf=1e9; int main() { //freopen("planting.in","r",stdin); //freopen("planting.out","w",stdout); ios_base::sync_with_stdio(false); cin.tie(NULL); int n,m; cin>>n>>m; int a[n+1],b[m+1]; for (int i=1;i<=n;i++) { cin>>a[i]; } for (int i=1;i<=m;i++) { cin>>b[i]; } vector<bool>dp(1001); dp[0]=1; for (int i=0;i<=1000;i++) { if (dp[i]) { for (int j=1;j<=m;j++) { dp[i+b[j]]=true; } } } for (int i=1;i<=n;i++) { if (!dp[i]) { cout<<"NO"; E; } } cout<<"YES"; }

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

bank.cpp:3: warning: ignoring #pragma optimize  [-Wunknown-pragmas]
    3 | #pragma optimize ("g",on)
      |
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...