結果
| 問題 | No.8130 プラチナバッハ問題 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-01 22:10:10 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 15 ms / 6,000 ms |
| コード長 | 442 bytes |
| 記録 | |
| コンパイル時間 | 605 ms |
| コンパイル使用メモリ | 76,144 KB |
| 実行使用メモリ | 82,768 KB |
| 最終ジャッジ日時 | 2026-04-01 22:10:25 |
| 合計ジャッジ時間 | 2,658 ms |
|
ジャッジサーバーID (参考情報) |
judge4_1 / judge2_0 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| small | 10 % | AC * 12 |
| large | 90 % | AC * 18 |
| 合計 | 2.5 * 100% = 250 点 |
ソースコード
#include<iostream>
#include<bitset>
#include<cassert>
using namespace std;
const int L=1e6;
bool isp[L+1];
bitset<L+1>OK;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
/*
OK.set(0);
for(int p=2;p<=L;p++)if(!isp[p])
{
for(int i=p+p;i<=L;i+=p)isp[i]=true;
OK|=OK<<p;
}
for(int n=1;n<=L;n++)if(!OK.test(n))cout<<n<<endl;
*/
int T;cin>>T;
for(;T--;)
{
long N;cin>>N;
cout<<(N==1||N==4||N==6?"No\n":"Yes\n");
}
}