比赛 “Asm.Def战记之拉格朗日点”杯 评测结果 C
题目名称 Asm.Def的微小贡献 最终得分 0
用户昵称 pppoooiiizzy 运行时间 0.000 s
代码语言 C++ 内存使用 0.00 MiB
提交时间 2015-11-04 11:12:25
显示代码纯文本
#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);
    freopn("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;
}