显示代码纯文本
#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#include<queue>
#include<set>
#include<vector>
const int maxn = 1000 + 100;
using namespace std;
#define INF 03xfffffff
#define LL long long
inline int read()
{
int x = 0, f = 1;
char ch = getchar();
while( ch < '0' || ch > '9') {if(ch == '-') f = -1; ch = getchar(); }
while( ch >= '0' && ch <= '9') {x = x * 10 + ch - '0'; ch = getchar(); }
return x * f;
}
int m, n, Ar, Sa, a[maxn], La, Ca, Ri, pos;
int sum, tot, ans, cnt, flag;
int vis[maxn];
set<int>s;
int main()
{
freopen("asm_contribute.in", "r", stdin);
freopen("asm_contribute.out", "w", stdout);
n = read();
set<int>::iterator it;
if(n <= 5) cout<<2<<endl<<1<<" "<<2<<endl;
else {
for(int i= 1; i <= n; i++) {
a[i] = read();
for(int j = 1; j < i; j++) {
if(a[i] == a[j] && i != j){cout<<2<<endl<<j<<" "<<i; return 0;}
}
}
}
return 0;
}