結果
| 問題 |
No.237 作図可能性
|
| コンテスト | |
| ユーザー |
kpinkcat
|
| 提出日時 | 2023-11-07 17:49:34 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 742 bytes |
| コンパイル時間 | 2,470 ms |
| コンパイル使用メモリ | 198,776 KB |
| 最終ジャッジ日時 | 2025-02-17 19:58:11 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 28 |
ソースコード
#include <bits/stdc++.h>
#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#include<list>
#include<queue>
#include<math.h>
#include<bitset>
using ll = long long;
using namespace std;
int main(){
int cnt = 0, a;
cin >> a;
vector<int> fp{3, 5, 17, 257, 65537};
set<int> poly;
for (int i = 0; i < 31; i++){
for (int j = 0; j < (1 << 5); j++){
int tmp = pow(2, i)*(max(1, fp[0]*(bool)(j & 1)))*(max(1, fp[1]*(bool)(j & (1 << 1))))*(max(1, fp[2]*(bool)(j & (1 << 2))))*(max(1, fp[3]*(bool)(j & (1 << 3))))*(max(1, fp[4]*(bool)(j & (1 << 4))));
if (tmp <= a && tmp >= 3) poly.insert(tmp);
}
}
cout << poly.size() << endl;
}
kpinkcat