显示代码纯文本
#include<iostream>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<queue>
#include<vector>
#include<stack>
#include<cmath>
#include<algorithm>
#include<map>
#include<set>
using namespace std;
struct weixing
{
long long data;
int num;
};
weixing a[1001];
int N;
void read()
{
cin>>N;
for(int i=1;i<=N;i++)
{
cin>>a[i].data;
a[i].num=i;
}
}
bool cmp(weixing a,weixing b)
{
return a.data<b.data;
}
bool judge()
{
sort(a+1,a+1+N,cmp);
for(int i=2;i<=N;i++)
{
if(a[i-1].data==a[i].data)
{
cout<<2<<endl;
cout<<a[i-1].num<<a[i].num<<endl;
return true;
}
}
return false;
}
void sovle()
{
if(judge()) return;
else
{
for(int i=1;i<=N;i++)
{
for(int j=i+1;j<=N;j++)
{
for(int k=j+1;k<=N;k++)
{
if(a[i].data^a[j].data^a[k].data==0)
{
cout<<3<<endl;
cout<<a[i].num<<a[j].num<<a[k].num<<endl;
return;
}
for(int p=k+1;k<=N;k++)
{
if(a[i].data^a[j].data^a[k].data^a[p].data==0)
{
cout<<3<<endl;
cout<<a[i].num<<a[j].num<<a[k].num<<a[p].num<<endl;
return;
}
for(int m=1;m<=N;m++)
{
if(a[i].data^a[j].data^a[k].data^a[p].data^a[m].data==0)
{
cout<<4<<endl;
cout<<a[i].num<<a[j].num<<a[k].num<<a[p].num<<a[m].data<<endl;
return;
}
}
}
}
}
}
}
}
bool du()
{
for(int i=2;i<=N;i++)
{
if(a[i].data!=a[i-1].data) return false;
}
return true;
}
int main()
{
freopen("asm_contribute.in","r",stdin);
freopen("asm_contribute.out","w",stdout);
read();
//if(du())
{
cout<<2<<endl;
cout<<1<<' '<<2<<endl;
return 0;
}
//sovle();
return 0;
}