QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#574658 | #9313. Make Max | huanmeng | WA | 0ms | 3556kb | C++14 | 534b | 2024-09-18 23:37:41 | 2024-09-18 23:37:41 |
Judging History
answer
#include <iostream>
#include <vector>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
// 找到相邻不同的区域
int operations = 0;
for (int i = 1; i < n; i++) {
if (a[i] != a[i-1]) {
operations++;
}
}
cout << operations << endl;
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3556kb
input:
4 2 1 2 2 2 2 7 1 1 1 2 2 2 2 3 1 2 3
output:
1 0 1 2
result:
wrong answer 3rd numbers differ - expected: '3', found: '1'