제출 #1089152

#제출 시각아이디문제언어결과실행 시간메모리
1089152vjudge1은행 (IZhO14_bank)C++17
19 / 100
57 ms428 KiB
/** * data : 09.07.2024 * **/ #include <bits/stdc++.h> // #include "algo/turnikmen.h" using namespace std; // #define int long long #define bitt __builtin_popcountll #define bitzero __builtin_clz // #pragma GCC optimize("O3,unroll-loops") // #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") void fReopen () { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif } mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); signed main (/* time : 9:17 AM */) { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); // fReopen(); int n, m; cin >> n >> m; vector<int> a(n), b(m); for (auto &x : a) cin >> x; for (auto &x : b) cin >> x; for (int mask = 0; mask < (1 << m); mask++) { int res = 0; for (int i = 0; i < m; i++) { if (mask >> i & 1) res += b[i]; } if (res == a[0]) { cout << "YES\n"; return 0; } } cout << "NO\n"; }

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

bank.cpp: In function 'void fReopen()':
bank.cpp:20:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   20 |         freopen("input.txt", "r", stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
bank.cpp:21:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   21 |         freopen("output.txt", "w", stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...