結果
| 問題 |
No.1727 [Cherry 3rd Tune] Stray
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2021-08-15 16:56:25 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 722 bytes |
| コンパイル時間 | 4,715 ms |
| コンパイル使用メモリ | 143,936 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-07 08:45:15 |
| 合計ジャッジ時間 | 3,675 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 8 |
ソースコード
#include<iostream>
#include<vector>
#include<atcoder/all>
using namespace std;
int action(int x,vector<int> a,int N){
int y=0;
for (int i=0; i<2*N; i++){
if (x&(1<<i)) y|=1<<a[i];
}
return y;
}
int main(){
int N; cin >> N;
atcoder::dsu U(1<<(2*N));
vector<int> t(2*N,0), u(2*N,0);
// 2π/N 回転
for (int j=0; j<N; j++){
t[j] =(1+j)%N;
t[j+N]=t[j]+N;
}
// ひっくり返す
for (int j=0; j<N; j++){
u[j+N]=(N-1)-j;
u[j] =u[j+N]+N;
}
for (int S=0; S<(1<<(2*N)); S++){
U.merge(S,action(S,t,N));
U.merge(S,action(S,u,N));
}
vector<vector<int>> G=U.groups();
cout << G.size() << endl;
}
Kazun