# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
783084 |
2023-07-14T15:09:23 Z |
Andrey |
Cat (info1cup19_cat) |
C++14 |
|
210 ms |
15664 KB |
#include <bits/stdc++.h>
using namespace std;
void solve() {
int n,a;
cin >> n;
vector<int> p(n+1);
for(int i = 1; i <= n; i++) {
cin >> a;
p[a] = i;
}
for(int i = 1; i <= n/2; i++) {
if(p[i] != n-p[n-i+1]+1) {
cout << -1 << "\n";
return;
}
}
cout << 1 << " " << 0 << "\n";
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t;
cin >> t;
while(t--) {
solve();
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
212 KB |
Wrong answer |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
340 KB |
Correctly distinguished between possibility and impossibility |
2 |
Correct |
12 ms |
724 KB |
Correctly distinguished between possibility and impossibility |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
212 KB |
Wrong answer |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
340 KB |
Correctly distinguished between possibility and impossibility |
2 |
Correct |
12 ms |
724 KB |
Correctly distinguished between possibility and impossibility |
3 |
Correct |
206 ms |
15548 KB |
Correctly distinguished between possibility and impossibility |
4 |
Correct |
210 ms |
15664 KB |
Correctly distinguished between possibility and impossibility |
5 |
Correct |
165 ms |
15492 KB |
Correctly distinguished between possibility and impossibility |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
212 KB |
Wrong answer |
2 |
Halted |
0 ms |
0 KB |
- |