# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
836314 | exodus_ | Labels (NOI20_labels) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
const int maxn = 1e5+5;
int D[maxn], A[maxn], B[maxn];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int N;
cin >> N;
for(int i=1; i<N; i++) {
cin >> D[i];
}
if(D[1]==1) {
cout << "1 2" << endl;
} else
if(D[1]==-1) {
cout << "2 1" << endl;
} else {
cout << "-1" <, endl;
}
return 0;
}