結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 WA -
testcase_04 AC 2 ms
6,676 KB
testcase_05 AC 2 ms
6,676 KB
testcase_06 AC 2 ms
6,676 KB
testcase_07 WA -
testcase_08 AC 2 ms
6,676 KB
testcase_09 WA -
testcase_10 AC 2 ms
6,676 KB
testcase_11 AC 211 ms
33,152 KB
testcase_12 AC 141 ms
23,936 KB
testcase_13 AC 250 ms
37,168 KB
testcase_14 AC 108 ms
20,096 KB
testcase_15 AC 163 ms
28,032 KB
testcase_16 AC 32 ms
9,472 KB
testcase_17 AC 122 ms
21,632 KB
testcase_18 AC 250 ms
36,168 KB
testcase_19 AC 281 ms
38,272 KB
testcase_20 AC 151 ms
27,648 KB
testcase_21 AC 54 ms
12,800 KB
testcase_22 AC 284 ms
38,764 KB
testcase_23 AC 174 ms
29,824 KB
testcase_24 AC 82 ms
16,000 KB
testcase_25 AC 130 ms
21,376 KB
testcase_26 AC 272 ms
38,272 KB
testcase_27 AC 152 ms
25,984 KB
testcase_28 AC 175 ms
29,568 KB
testcase_29 AC 449 ms
63,816 KB
testcase_30 AC 445 ms
57,756 KB
testcase_31 AC 403 ms
56,828 KB
testcase_32 AC 470 ms
65,492 KB
testcase_33 AC 461 ms
63,664 KB
testcase_34 AC 423 ms
58,360 KB
testcase_35 AC 440 ms
58,772 KB
testcase_36 AC 465 ms
56,348 KB
testcase_37 AC 432 ms
57,580 KB
testcase_38 AC 501 ms
66,788 KB
testcase_39 AC 457 ms
66,916 KB
testcase_40 AC 464 ms
66,916 KB
testcase_41 AC 492 ms
66,916 KB
testcase_42 AC 465 ms
66,788 KB
testcase_43 AC 493 ms
66,788 KB
testcase_44 AC 531 ms
66,916 KB
testcase_45 AC 466 ms
66,788 KB
testcase_46 AC 495 ms
66,916 KB
testcase_47 AC 2 ms
6,676 KB
testcase_48 AC 2 ms
6,676 KB
testcase_49 AC 3 ms
6,676 KB
testcase_50 AC 1 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 5 ms
6,676 KB
testcase_55 AC 2 ms
6,676 KB
testcase_56 AC 2 ms
6,676 KB
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]>=2){
        cout<<"Yes"<<endl;
        return 0;
      }
      if(mp[Y]==1 && Y!=C[i]){
        cout<<"Yes"<<endl;
        return 0;
      }
    }
  }
  cout<<"No"<<endl;
    
  return 0;
}
0