結果

問題 No.2836 Comment Out
コンテスト
ユーザー Butterflv
提出日時 2024-08-09 22:23:13
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 21 ms / 2,000 ms
コード長 609 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,610 ms
コンパイル使用メモリ 351,860 KB
実行使用メモリ 7,976 KB
最終ジャッジ日時 2026-04-03 20:37:07
合計ジャッジ時間 6,824 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 52
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;

int N,A[201010];

int main(){
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  cout<<fixed<<setprecision(15);

  cin>>N;
  for(int i=0;i<N;i++){
    int A;cin>>A;
    if(A==0||A==1){
      cout<<"Yes"<<endl;
      exit(0);
    }
  }
  cout<<"No"<<endl;
  // for(int i=1;i<=N;i++)cin>>A[i];
  // for(int i=1;i<=N-1;i++){
  //   if(abs(A[i]-A[i+1])>1){
  //     cout<<"No"<<endl;
  //     exit(0);
  //   }
  // }
  // if(abs(A[0]-A[1])>1&&abs(A[N]-A[N+1])>1){
  //   cout<<"No"<<endl;
  // }else{
  //   cout<<"Yes"<<endl;
  // }
}
0