Submission #1008730

#TimeUsernameProblemLanguageResultExecution timeMemory
1008730Rolo678Labels (NOI20_labels)C++14
0 / 100
28 ms1980 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...