結果

問題 No.1444 !Andd
ユーザー Example0911Example0911
提出日時 2021-03-26 23:01:47
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 510 bytes
コンパイル時間 3,518 ms
コンパイル使用メモリ 207,732 KB
実行使用メモリ 10,124 KB
最終ジャッジ日時 2023-08-19 09:45:30
合計ジャッジ時間 5,836 ms
ジャッジサーバーID
(参考情報)
judge15 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
10,124 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 TLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
#define int long long
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll INF = (1LL << 61);
ll mod = 1000000007;



signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int N; cin >> N;
	vector<int>A(N); for (int i = 0; i < N; i++)cin >> A[i];
	set<int>st;
	st.insert(1);
	for (int i = 0; i < N; i++) {
		set<int>now;
		for (auto x : st) {
			now.insert(x *A[i]);
			now.insert((x & A[i]));
		}
		st = now;
		cout << st.size() << endl;
	}
	
	return 0;
}
0