結果
問題 |
No.3184 Make Same
|
ユーザー |
![]() |
提出日時 | 2025-07-25 17:02:20 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 802 bytes |
コンパイル時間 | 3,472 ms |
コンパイル使用メモリ | 278,644 KB |
実行使用メモリ | 7,720 KB |
最終ジャッジ日時 | 2025-07-25 17:02:32 |
合計ジャッジ時間 | 10,485 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 24 |
ソースコード
#include <bits/stdc++.h> //#include <atcoder/modint> using namespace std; //using namespace atcoder; using ll = long long; //using mint = modint998244353; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); /* 二進数 001010 001010 100101 110101 111000 i=29,...,0の順に 2^iを足す。毎回ソートされるので ibit目が0のものは前半に来る。 */ int N; cin >> N; vector<int> A(N); for (int i=0; i<N; i++) cin >> A[i]; for (int i=29; i>=0; i--){ int cnt=0; for (int j=0; j<N; j++){ if (!((A[j]>>i) & 1)) cnt++; } if (cnt){ cout << 1 << " " << 1+cnt-1 << " " << (1<<i) << endl; } } return 0; }