結果

問題 No.1242 高橋君とすごろく
ユーザー abc3
提出日時 2020-10-02 22:29:12
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 699 bytes
コンパイル時間 2,018 ms
コンパイル使用メモリ 197,672 KB
最終ジャッジ日時 2025-01-15 00:41:03
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 16 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#include <iomanip>
#include <cstdint>
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const int INF=1001001001;
const int mod = 1000000007;
 
int main() {
  int64_t N,K;
  cin>>N>>K;
  vector<int64_t>A(K);
  for(int i=0;i<K;i++){
      cin>>A[i];
  }
  vector<bool>t(7,false);
  for(int i=0;i<K;i++){
      t[A[i]%6]=true;
  }
  bool ok=true;
  if(t[3]&&t[4]){ok=false;}
  if(t[1]&&t[6]){ok=false;}
  if(t[2]&&t[5]){ok=false;}

  if(ok){cout<<"Yes"<<endl;}
  else{cout<<"No"<<endl;}
  return 0;
}
0