QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#109647 | #6506. Chase Game 3 | 2811928366 | WA | 2ms | 3404kb | C++23 | 600b | 2023-05-30 01:26:33 | 2023-05-30 01:26:37 |
Judging History
answer
#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
const int MAXN = 4e5 + 10;
int main() {
long long T;
cin >> T;
for (long long i = 0; i < T; i++) {
long long n;
bool go = true;
cin >> n;
vector<int>str(n+1);
for (int j = 1; j <= n; j++) {
cin >> str[j];
if (j != 0 && abs(str[j - 1] - str[j]) >= 3) {
go = false;
}
}
if (go) {
cout << "Yes\n";
}
else {
cout << "No\n";
}
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 3336kb
input:
5 2 1 2 3 2 3 1 4 1 4 3 2 5 1 5 2 3 4 6 1 2 3 4 5 6
output:
Yes Yes No No Yes
result:
ok 5 token(s): yes count is 3, no count is 2
Test #2:
score: -100
Wrong Answer
time: 2ms
memory: 3404kb
input:
8 2 1 2 2 2 1 3 1 2 3 3 3 1 2 3 2 1 3 3 2 3 1 3 3 2 1 3 1 3 2
output:
Yes Yes Yes No Yes Yes No Yes
result:
wrong answer expected YES, found NO [4th token]