제출 #1106092

#제출 시각아이디문제언어결과실행 시간메모리
1106092akzytr은행 (IZhO14_bank)C++17
0 / 100
2 ms592 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define arr array #define vec vector #define sz(a) ((int)(a).size()) void B() { /* Problem B: Bank Subtask 1: n = 1, Normal knapsack, 1000 */ int N, M; cin >> N >> M; int a[N]; int b[M]; for(int i = 0; i < N; i++) { cin >> a[i]; } for(int i = 0; i < M; i++) { cin >> b[i]; } assert(N = 1); assert(M <= 10); bitset<1002> g; g[0] = 1; for(int i : b) { g |= (g << i); } cout << (g[a[0]] ? "YES" : "NO") << endl; } int main() { B(); }

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

In file included from /usr/include/c++/10/cassert:44,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:33,
                 from bank.cpp:1:
bank.cpp: In function 'void B()':
bank.cpp:25:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   25 |  assert(N = 1);
      |         ~~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...