# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1008730 |
2024-06-26T17:05:01 Z |
Rolo678 |
Labels (NOI20_labels) |
C++14 |
|
28 ms |
1980 KB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >>n;
vector<int>d(n);
for(int i = 1;i<n;i++)
{
cin >>d[i];
}
if(abs(d[1]) != 2*n-2) cout<<-1<<'\n';
else if (d[1] == -2*n + 2) cout<< n-1 << ' '<< -n+1 <<'\n';
else if (d[1] == 2*n-2) cout<< -n+1 << ' '<< n-1 <<'\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
28 ms |
1980 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |