結果

問題 No.2684 折々の色
ユーザー umezoumezo
提出日時 2024-03-21 07:04:23
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,073 bytes
コンパイル時間 6,594 ms
コンパイル使用メモリ 261,096 KB
実行使用メモリ 66,916 KB
最終ジャッジ日時 2024-03-21 07:04:50
合計ジャッジ時間 22,298 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 3 ms
6,676 KB
testcase_02 AC 3 ms
6,676 KB
testcase_03 WA -
testcase_04 AC 3 ms
6,676 KB
testcase_05 AC 3 ms
6,676 KB
testcase_06 AC 3 ms
6,676 KB
testcase_07 WA -
testcase_08 AC 4 ms
6,676 KB
testcase_09 WA -
testcase_10 AC 3 ms
6,676 KB
testcase_11 AC 207 ms
33,152 KB
testcase_12 AC 122 ms
23,936 KB
testcase_13 AC 235 ms
37,168 KB
testcase_14 AC 102 ms
20,096 KB
testcase_15 AC 149 ms
28,032 KB
testcase_16 AC 31 ms
9,472 KB
testcase_17 AC 113 ms
21,632 KB
testcase_18 AC 224 ms
36,168 KB
testcase_19 AC 223 ms
38,272 KB
testcase_20 AC 145 ms
27,648 KB
testcase_21 AC 50 ms
12,800 KB
testcase_22 AC 243 ms
38,764 KB
testcase_23 AC 157 ms
29,824 KB
testcase_24 AC 74 ms
16,000 KB
testcase_25 AC 111 ms
21,376 KB
testcase_26 AC 214 ms
38,272 KB
testcase_27 AC 136 ms
25,984 KB
testcase_28 AC 176 ms
29,568 KB
testcase_29 AC 387 ms
63,816 KB
testcase_30 AC 373 ms
57,756 KB
testcase_31 AC 376 ms
56,828 KB
testcase_32 AC 401 ms
65,492 KB
testcase_33 AC 403 ms
63,664 KB
testcase_34 AC 385 ms
58,360 KB
testcase_35 AC 387 ms
58,772 KB
testcase_36 AC 370 ms
56,348 KB
testcase_37 AC 388 ms
57,580 KB
testcase_38 AC 428 ms
66,788 KB
testcase_39 AC 428 ms
66,916 KB
testcase_40 AC 446 ms
66,916 KB
testcase_41 AC 425 ms
66,916 KB
testcase_42 AC 421 ms
66,788 KB
testcase_43 AC 448 ms
66,788 KB
testcase_44 AC 578 ms
66,916 KB
testcase_45 AC 443 ms
66,788 KB
testcase_46 AC 449 ms
66,916 KB
testcase_47 AC 2 ms
6,676 KB
testcase_48 AC 2 ms
6,676 KB
testcase_49 AC 1 ms
6,676 KB
testcase_50 AC 2 ms
6,676 KB
testcase_51 AC 2 ms
6,676 KB
testcase_52 AC 2 ms
6,676 KB
testcase_53 AC 2 ms
6,676 KB
testcase_54 AC 2 ms
6,676 KB
testcase_55 AC 2 ms
6,676 KB
testcase_56 WA -
testcase_57 AC 1 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  
  int n,m;
  cin>>n>>m;
  vector<ll> X(m);
  rep(i,m) cin>>X[i];
  vector<vector<ll>> C(n,vector<ll>(m));
  vector<ll> T(n);
  rep(i,n){
    rep(j,m) cin>>C[i][j];
    cin>>T[i];
  }
  
  rep(i,m) X[i]*=100;
  rep(i,n) rep(j,m) C[i][j]*=T[i];
  
  map<vector<ll>,ll> mp;
  rep(i,n) mp[C[i]]++;
  
  rep(i,n){
    if(T[i]==100){
      if(C[i]==X){
        cout<<"Yes"<<endl;
        return 0;
      }
      continue;
    }
    if(C[i]==X){
      if(mp[X]>=2){
        cout<<"Yes"<<endl;
        return 0;
      }
      continue;
    }
    vector<ll> Y(m);
    bool b=true;
    rep(j,m){
      if((100*(X[j]-C[i][j]))%(100-T[i])!=0){
        b=false;
        break;
      }
      Y[j]=(100*(X[j]-C[i][j]))/(100-T[i]);
    }
    if(b){
      if(mp[Y]>=1){
        cout<<"Yes"<<endl;
        return 0;
      }
    }
  }
  cout<<"No"<<endl;
    
  return 0;
}
0