# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
482716 |
2021-10-26T06:33:35 Z |
rk42745417 |
Cat (info1cup19_cat) |
C++17 |
|
216 ms |
15776 KB |
#include <bits/stdc++.h>
using namespace std;
#define EmiliaMyWife ios::sync_with_stdio(0); cin.tie(0);
using ll = int64_t;
using ull = uint64_t;
using uint = uint32_t;
using ld = long double;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const ll LINF = ll(2e18) + ll(1e15);
const double EPS = 1e-8;
static auto LamyIsCute = []() {
EmiliaMyWife
return 48763;
}();
signed main() {
int t;
cin >> t;
while(t--) {
int n;
cin >> n;
vector<int> arr(n);
for(int &a : arr)
cin >> a;
bool ok = 1;
for(int i = 0; i < n; i++)
if(arr[i] + arr[n - i - 1] != n + 1)
ok = false;
if(ok)
cout << "0 0\n";
else
cout << "-1\n";
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
332 KB |
Wrong answer |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
716 KB |
Correctly distinguished between possibility and impossibility |
2 |
Correct |
9 ms |
804 KB |
Correctly distinguished between possibility and impossibility |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
332 KB |
Wrong answer |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
716 KB |
Correctly distinguished between possibility and impossibility |
2 |
Correct |
9 ms |
804 KB |
Correctly distinguished between possibility and impossibility |
3 |
Correct |
201 ms |
15544 KB |
Correctly distinguished between possibility and impossibility |
4 |
Correct |
194 ms |
15776 KB |
Correctly distinguished between possibility and impossibility |
5 |
Correct |
216 ms |
15492 KB |
Correctly distinguished between possibility and impossibility |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
332 KB |
Wrong answer |