結果

問題 No.2329 Nafmo、イカサマをする
ユーザー cho435cho435
提出日時 2023-05-28 15:21:46
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 554 bytes
コンパイル時間 2,122 ms
コンパイル使用メモリ 210,096 KB
実行使用メモリ 183,748 KB
最終ジャッジ日時 2023-08-27 12:00:30
合計ジャッジ時間 8,253 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
8,760 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 105 ms
8,296 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 3 ms
4,380 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 2 ms
4,376 KB
testcase_19 AC 431 ms
19,740 KB
testcase_20 AC 4 ms
4,376 KB
testcase_21 AC 6 ms
4,376 KB
testcase_22 AC 8 ms
4,380 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 2 ms
4,376 KB
testcase_25 AC 4 ms
4,380 KB
testcase_26 AC 1 ms
4,380 KB
testcase_27 AC 2 ms
4,376 KB
testcase_28 AC 2 ms
4,376 KB
testcase_29 AC 1,149 ms
53,448 KB
testcase_30 AC 4 ms
4,380 KB
testcase_31 AC 2 ms
4,376 KB
testcase_32 AC 2 ms
4,376 KB
testcase_33 AC 2 ms
4,376 KB
testcase_34 AC 2 ms
4,380 KB
testcase_35 AC 13 ms
4,792 KB
testcase_36 TLE -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
  ll n,m,k;
  cin>>n>>m>>k;
  vector<int> a(n);
  rep(i,n) cin>>a.at(i);
  map<ll,ll> mp={{0,0}};
  int bf=0;
  while(!mp.empty()){
    auto [nw,ct]=*mp.begin();
    mp.erase(mp.begin());
    if(nw>m){
      cout<<bf<<endl;
      return 0;
    }
    bf=nw;
    if(ct<k){
      rep(i,n){
        if(!mp.count(nw+a.at(i))){
          mp[nw+a.at(i)]=ct+1;
        }
      }
    }
  }
  cout<<bf<<endl;
}
0