题目

#include<iostream>
#include<cmath>
#include<vector>
using namespace std;
int main() {
	int n;
	cin>>n;
	int a[n];
	for(int i=0; i<n; ++i)
		cin>>a[i];
    //全程模拟
	for(int i=0; i<n; ++i) {
		for(int j=i+1; j<n; ++j) {
			vector<int> b(n,1);
			vector<int>lie;
			b[i]=b[j]=-1;
			for(int k=0; k<n; ++k)
				if(a[k]*b[fabs(a[k])-1]<0)
					lie.push_back(k);
			if(lie.size()==2&&b[lie[0]]+b[lie[1]]==0) {
				cout<<i+1<<" "<<j+1;
				return 0;
			}
		}
	}
	cout<<"No Solution\n";
	return 0;
}