結果
| 問題 |
No.8090 Knapsack Function
|
| コンテスト | |
| ユーザー |
anmichi
|
| 提出日時 | 2022-04-01 21:43:33 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 2,000 ms |
| コード長 | 400 bytes |
| コンパイル時間 | 1,721 ms |
| コンパイル使用メモリ | 195,556 KB |
| 最終ジャッジ日時 | 2025-01-28 13:53:37 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
void solve() {
int n;
cin >> n;
vector<int> v(n), w(n);
for (int i = 0; i < n; i++) cin >> v[i] >> w[i];
if (count(w.begin(), w.end(), 1))
cout << "Yes" << endl;
else
cout << "No" << endl;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
/*int t;
cin >> t;
while (t--)*/
solve();
}
anmichi