結果

問題 No.8090 Knapsack Function
ユーザー drsbp51_appppdrsbp51_apppp
提出日時 2022-04-01 22:28:48
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 318 bytes
コンパイル時間 1,685 ms
コンパイル使用メモリ 170,212 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-20 10:08:48
合計ジャッジ時間 3,109 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main()
{
    int n;
    cin>>n;
    std::vector<ll> v(n),w(n) ;
    bool ans=false;
    rep(i,n){
        cin>>v[i]>>w[i];
        if(w[i]==1)ans=true;
    }
    cout<<(ans?"Yes":"No")<<endl;
}
0