QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#861095 | #9982. Staircase Museum | ucup-team6275# | WA | 4ms | 3712kb | C++23 | 846b | 2025-01-18 16:10:11 | 2025-01-18 16:10:11 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (n); i += 1)
#define len(a) ((int)(a).size())
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
mt19937 rnd(324);
const ll inf = 1e18;
int32_t main() {
if (1) {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
vector<pair<int, int>> vec(n);
for (auto &c : vec)
cin >> c.first >> c.second;
int ans = n;
for (int i = 0; i + 1 < n; ++i) {
ans -= (vec[i].first == vec[i + 1].first && vec[i].second == vec[i + 1].second);
}
cout << ans << "\n";
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3712kb
input:
4 3 1 2 1 3 1 3 3 1 2 2 3 3 3 3 1 1 1 3 3 3 4 1 2 2 3 3 4 4 5
output:
2 3 3 4
result:
ok 4 number(s): "2 3 3 4"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
1 1 1 1000000000
output:
1
result:
ok 1 number(s): "1"
Test #3:
score: -100
Wrong Answer
time: 4ms
memory: 3712kb
input:
9653 1 1 1 2 1 1 1 1 3 1 1 1 1 1 1 4 1 1 1 1 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 1 1 1 1 1 6 1 2 1 2 1 2 1 2 1 2 2 2 6 1 1 1 1 1 1 1 1 1 1 1 2 6 1 2 1 2 1 2 1 2 1 2 2 3 5 1 2 1 2 1 2 1 2 2 2 6 1 2 1 2 1 2 1 2 2 2 2 2 6 1 3 1 3 1 3 1 3 2 3 3 3 6 1 2 1 2 1 2 1 2 2 2 2 3 6 1 3 1 3 1 3 1 3 2 3...
output:
1 1 1 1 1 1 2 2 2 2 2 3 3 3 2 2 3 3 3 3 3 2 2 3 3 3 3 3 2 2 2 3 3 3 3 3 4 4 4 3 3 4 4 4 4 4 3 3 4 4 4 4 4 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 3 3 4 4 4 4 4 4 4 4 4 3 3 4 4 4 4 4 4 4 4 4 3 3 4 4 4 3 3 4 4 4 4 4 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 3 3 4 4 4 4 4 4 4 4 4 3 3 4 4 4 4 4 4 4 4 4 3 3 4 ...
result:
wrong answer 17th numbers differ - expected: '2', found: '3'