結果

問題 No.3787 17 years old
コンテスト
ユーザー Nihonielse
提出日時 2026-11-06 21:26:32
言語 C++23(gcc16)
(gcc 16.2.0 + boost 1.92.0 + ACL)
コンパイル:
g++-16 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc16.so -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 24 ms / 2,000 ms
+ 126µs
コード長 3,285 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,695 ms
コンパイル使用メモリ 353,736 KB
実行使用メモリ 9,908 KB
最終ジャッジ日時 2026-11-06 21:26:36
合計ジャッジ時間 4,129 ms
ジャッジサーバーID
(参考情報)
judge7_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#line 1 "lib/core.hpp"
// Library and Editor Setting is here: https://github.com/Nihonielse/competitive-library

#ifndef CORE_FILE
#define CORE_FILE

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

using ll = long long;
using ull = unsigned long long;

#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n, s) for (int i = s; i < n; i++)

#define vall(v) v.begin(), v.end()

constexpr int INF = 1 << 30;
constexpr int NEG_INF = -INF;
constexpr ll LINF = 1ll << 62;
constexpr ll NEG_LINF = -LINF;

template <typename T> inline bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}

template <typename T> inline bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}

template <typename T>
using min_priority_queue = priority_queue<T,vector<T>,greater<T>>;

#endif
#line 1 "lib/inout.hpp"



#line 1 "lib/core.hpp"
// Library and Editor Setting is here: https://github.com/Nihonielse/competitive-library

#ifndef CORE_FILE
#define CORE_FILE

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

using ll = long long;
using ull = unsigned long long;

#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n, s) for (int i = s; i < n; i++)

#define vall(v) v.begin(), v.end()

constexpr int INF = 1 << 30;
constexpr int NEG_INF = -INF;
constexpr ll LINF = 1ll << 62;
constexpr ll NEG_LINF = -LINF;

template <typename T> inline bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}

template <typename T> inline bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}

template <typename T>
using min_priority_queue = priority_queue<T,vector<T>,greater<T>>;

#endif
#line 5 "lib/inout.hpp"

inline void yn(const bool &tf) {
    if(tf)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}

inline void YN(const bool &tf) {
    if(tf)cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
}

inline void Yes() { cout << "Yes" << endl; }
inline void YES() { cout << "YES" << endl; }
inline void No() { cout << "No" << endl; }
inline void NO() { cout << "NO" << endl; }

template <typename T,typename S>
istream& operator>>(istream& is,pair<T,S>& pa){
    is >> pa.first >> pa.second;
    return is;
}

template <typename T,typename S>
ostream& operator<<(ostream& os,pair<T,S>& pa){
    os << pa.first << " " << pa.second;
    return os;
}

template <typename T>
istream& operator>>(istream& is,vector<T>& vec){
    for(T& item:vec){
        is >> item;
    }
    return is;
}

template <typename T>
ostream& operator<<(ostream& os,vector<T>& vec){
    for(int i=0;i<vec.size();i++){
        if(i) os << " ";
        os << vec[i];
    }
    return os;
}
template <typename T>
ostream& operator<<(ostream& os,vector<vector<T>>& vec){
    for(int i=0;i<vec.size();i++){
        os << vec[i];
        if(i<vec.size()-1)os << endl;
    }
    return os;
}

template <typename T,typename S>
ostream& operator<<(ostream& os,vector<pair<T,S>>& vec){
    for(int i=0;i<vec.size();i++){
        os << vec[i];
        if(i<vec.size()-1)os << endl;
    }
    return os;
}


#line 3 "codes/B.cpp"

int main(){
	int t;
	cin>>t;
	while(t--){
		int n;
		cin>>n;
		if(n==1||n==2||n==4||n==8||n==16)cout<<"Yes"<<endl;
		else cout<<"No"<<endl;
	}
}
0