#include<bits/stdc++.h>
using namespace std;
long long a[200007];
vector<int>v[77];
int main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin>>n;
for(int i=1;i<=n;++i){
cin>>a[i];
long long tmp=a[i];
int cnt=0;
while(!(tmp&1)){
tmp/=2;
++cnt;//二进制上最后一位1的位置
}
v[cnt].push_back(i);
}
int mx=v[0].size();
int pos=0;
for(int i=1;i<=64;++i)
if(v[i].size()>mx){
mx=v[i].size();
pos=i;
}
cout<<n-mx<<"\n";
for(int i=0;i<=64;++i){
if(i==pos)
continue;
for(int j=0;j<v[i].size();++j)
cout<<a[v[i][j]]<<" ";
}
return 0;
}

Codeforces Round #586 (Div. 1 + Div. 2)D(二分图构建,思维,结论需数论证明)的更多相关文章

  1. Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship

    Problem   Educational Codeforces Round 60 (Rated for Div. 2) - C. Magic Ship Time Limit: 2000 mSec P ...

  2. Educational Codeforces Round 60 (Rated for Div. 2) - D. Magic Gems(动态规划+矩阵快速幂)

    Problem   Educational Codeforces Round 60 (Rated for Div. 2) - D. Magic Gems Time Limit: 3000 mSec P ...

  3. Educational Codeforces Round 43 (Rated for Div. 2)

    Educational Codeforces Round 43 (Rated for Div. 2) https://codeforces.com/contest/976 A #include< ...

  4. Educational Codeforces Round 35 (Rated for Div. 2)

    Educational Codeforces Round 35 (Rated for Div. 2) https://codeforces.com/contest/911 A 模拟 #include& ...

  5. Codeforces Educational Codeforces Round 44 (Rated for Div. 2) F. Isomorphic Strings

    Codeforces Educational Codeforces Round 44 (Rated for Div. 2) F. Isomorphic Strings 题目连接: http://cod ...

  6. Codeforces Educational Codeforces Round 44 (Rated for Div. 2) E. Pencils and Boxes

    Codeforces Educational Codeforces Round 44 (Rated for Div. 2) E. Pencils and Boxes 题目连接: http://code ...

  7. Educational Codeforces Round 63 (Rated for Div. 2) 题解

    Educational Codeforces Round 63 (Rated for Div. 2)题解 题目链接 A. Reverse a Substring 给出一个字符串,现在可以对这个字符串进 ...

  8. Educational Codeforces Round 39 (Rated for Div. 2) G

    Educational Codeforces Round 39 (Rated for Div. 2) G 题意: 给一个序列\(a_i(1 <= a_i <= 10^{9}),2 < ...

  9. Educational Codeforces Round 48 (Rated for Div. 2) CD题解

    Educational Codeforces Round 48 (Rated for Div. 2) C. Vasya And The Mushrooms 题目链接:https://codeforce ...

随机推荐

  1. Gradle是什么?

    Gradle是什么? Gradle是一个基于Apache Ant和Apache Maven概念的项目自动化构建工具.它使用一种基于Groovy的特定领域语言(DSL)来声明项目设置,抛弃了基于XML的 ...

  2. tensorflow之tensorboard

    参考https://www.cnblogs.com/felixwang2/p/9184344.html 边学习,边练习 # https://www.cnblogs.com/felixwang2/p/9 ...

  3. linux创建用户组、用户

    创建用户组 groupadd -g 1024 nameinfo 创建用户 首先创建目录 mkdir -p /home 创建用户 useradd -g nameinfo -u 1024 -d /home ...

  4. 卫哲VS投行女,秋后算账是阿里的企业文化吗?

    编辑 | 于斌 出品 | 于见(mpyujian) 提到马云,大家都会想到淘宝,阿里,也都期待阿里巴巴的马云爸爸能够给我们免单,从而省去我们每天为钱烦恼的后顾之忧.虽然今天要吃的瓜是有关阿里的,但是并 ...

  5. 【MySQL】常用增删改查

    目录 1. 文件夹(库) 2. 文件(表) 3. 文件内容(数据) "@ ___ 1. 文件夹(库) # 增 create database db charset utf8; # 查 sho ...

  6. python requests.request 和session.request区别究竟在哪里

    import requests hd={"X-auth":"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzeXN0ZW0iLCJBUEkiOiIvdW ...

  7. Eclipse Tomcat 7.0 添加WEB项目报错:Tomcat version 7.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 and 6 Web modules

    前言 我叫梅乾花,我误闯了“从零开始的程序世界”,遭受到了前所未有的的困难,为了活下去,为了看见美好的明天,我开始学习之旅. 问题篇我打开了"Eclipse",将项目导入其中,开启 ...

  8. 一行代码解决 sql语句 in传入数组变字符串

    --数组 var arrs= ['test1','test2','test3'];--变字符串 var instring = "'"+arrs.join("','&quo ...

  9. UNL/EVE关联putty和wireshark

    这里默认UNL已经安装完毕,然后启动虚拟机启动UNL. 在浏览器输入http://192.168.1.199/ 进入UNL.然后简单的搭建一个拓扑: 这里只讲R1和ASA开启,先来配置Telnet功能 ...

  10. XCOJ 1205 A.First Blood

    1205: A.First Blood 时间限制: 1 Sec  内存限制: 64 MB提交: 152  解决: 44 标签提交统计讨论版 题目描述 盖伦是个小学一年级的学生,在一次数学课的时候,老师 ...