QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#867585 | #8889. Ice Cream Machines | KK1729# | 7 | 1ms | 3712kb | C++17 | 724b | 2025-01-23 19:50:02 | 2025-01-23 19:50:04 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define pb push_back
#define all(a) a.begin(), a.end()
#define endl "\n"
void printVector(vector<int> a){
for (auto x: a) cout << x << " ";
cout << endl;
}
void solve(){
int n, m, k; cin >> n >> m >> k;
vector<int> c(n);
FOR(i,0,n) cin >> c[i];
int ans = 1;
FOR(i,1,n){
if (c[i] != c[i-1]) ans++;
}
cout << ans << endl;
}
int32_t main(){
// freopen("in.in", "r", stdin);
// freopen("out.out", "w", stdout);
ios::sync_with_stdio(false);cin.tie(nullptr);
int t = 1; // cin >> t;
while (t--) solve();
}
详细
Subtask #1:
score: 7
Accepted
Test #1:
score: 7
Accepted
time: 1ms
memory: 3712kb
input:
1000 10 1 3 6 6 8 4 7 4 10 1 6 6 2 1 8 4 10 5 9 3 4 7 5 9 6 2 8 8 7 1 1 1 9 8 6 4 6 5 4 8 8 2 3 1 7 7 10 4 10 5 5 2 7 5 1 6 8 7 9 10 4 9 2 4 5 7 8 10 9 1 5 1 7 10 4 10 10 5 10 10 10 5 3 5 5 7 4 6 6 10 6 9 5 6 3 3 3 7 10 7 4 5 10 6 4 2 4 8 7 6 9 7 5 6 9 9 7 4 5 8 8 10 6 1 4 9 3 9 10 1 7 3 4 8 1 3 9 5...
output:
899
result:
ok 1 number(s): "899"
Test #2:
score: 7
Accepted
time: 0ms
memory: 3712kb
input:
1000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
1
result:
ok 1 number(s): "1"
Test #3:
score: 7
Accepted
time: 0ms
memory: 3584kb
input:
751 8 1 8 6 5 4 7 8 2 6 4 7 4 2 2 5 3 7 7 3 7 2 5 3 4 8 6 8 1 4 3 8 4 1 3 3 5 3 6 6 8 8 1 4 6 8 8 3 5 7 5 7 1 1 1 2 8 1 8 6 4 5 1 2 7 5 5 5 7 4 3 1 4 3 8 6 5 3 1 7 5 7 8 3 8 2 6 8 6 5 4 1 1 5 1 4 7 7 5 2 6 8 4 3 2 6 5 7 7 4 4 5 1 7 2 2 2 6 7 6 2 4 7 3 2 6 2 3 2 1 4 8 8 7 6 3 4 7 2 4 3 1 7 2 7 1 3 6 ...
output:
655
result:
ok 1 number(s): "655"
Test #4:
score: 7
Accepted
time: 1ms
memory: 3712kb
input:
857 3 1 1 3 1 3 2 1 1 2 2 2 1 3 3 3 2 2 3 1 3 1 1 3 1 3 3 2 1 3 1 3 1 1 3 2 2 1 1 3 1 1 2 3 1 1 2 1 3 3 3 3 3 1 1 2 2 3 1 1 2 2 2 3 2 1 2 2 2 3 2 1 3 3 2 2 1 2 3 1 1 1 3 2 3 3 3 1 3 2 2 2 1 3 3 3 2 2 3 1 1 1 1 3 1 3 3 3 1 2 1 3 1 3 2 3 3 3 1 1 1 3 1 3 3 2 2 1 3 3 1 1 3 1 2 1 1 1 2 1 2 2 3 2 2 2 2 3 ...
output:
565
result:
ok 1 number(s): "565"
Test #5:
score: 7
Accepted
time: 0ms
memory: 3584kb
input:
888 3 1 2 1 1 3 2 3 2 2 2 1 2 2 1 3 2 1 1 1 2 3 3 1 2 3 1 3 3 3 2 2 1 2 2 1 1 1 2 2 1 3 1 3 3 3 3 2 2 1 3 3 1 1 1 3 3 2 1 2 3 3 2 2 1 3 3 2 1 1 1 1 1 2 2 2 2 3 3 2 1 1 2 3 2 2 1 3 3 1 2 1 2 1 1 2 1 2 1 3 2 2 3 1 3 3 1 1 1 3 1 2 3 2 1 1 1 2 3 2 2 1 2 1 3 3 3 2 3 1 2 2 3 1 1 3 3 3 2 3 2 1 1 3 1 2 3 1 ...
output:
599
result:
ok 1 number(s): "599"
Test #6:
score: 7
Accepted
time: 0ms
memory: 3712kb
input:
998 4 1 2 4 1 1 3 4 3 3 2 2 1 2 3 3 4 4 3 3 1 1 1 4 2 1 2 2 2 2 3 2 2 1 2 2 4 3 3 3 3 2 2 3 3 2 3 4 3 4 3 2 4 2 1 2 3 3 2 3 2 4 1 4 1 4 1 4 1 2 3 1 4 3 1 2 2 3 3 2 1 3 3 3 4 2 1 3 2 3 3 4 3 4 1 4 3 4 3 3 1 4 2 3 2 1 4 2 1 1 4 3 4 2 4 4 3 4 4 1 3 4 4 1 2 3 2 1 1 3 3 1 3 3 4 3 1 3 2 4 1 4 4 2 4 2 2 4 ...
output:
731
result:
ok 1 number(s): "731"
Test #7:
score: 7
Accepted
time: 1ms
memory: 3584kb
input:
1000 10 1 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9...
output:
1000
result:
ok 1 number(s): "1000"
Subtask #2:
score: 0
Wrong Answer
Dependency #1:
100%
Accepted
Test #8:
score: 0
Wrong Answer
time: 0ms
memory: 3712kb
input:
1000 10 2 5 1 5 10 1 10 9 10 3 9 7 6 4 3 1 10 7 9 5 9 5 4 2 7 7 8 4 4 4 3 10 8 4 2 5 7 5 10 9 2 6 1 4 7 9 5 6 3 4 3 5 4 3 9 2 6 3 2 6 9 8 4 5 5 2 9 10 2 6 1 7 3 6 6 7 4 10 7 8 5 8 8 2 7 8 10 5 2 8 4 2 10 3 9 7 8 6 7 9 7 9 2 5 4 5 10 2 4 3 9 2 3 7 9 3 10 8 4 1 8 9 10 8 10 2 6 3 2 2 5 5 2 8 7 9 5 7 7 ...
output:
895
result:
wrong answer 1st numbers differ - expected: '629', found: '895'
Subtask #3:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%
Subtask #4:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%
Subtask #5:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%
Subtask #6:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%
Subtask #7:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%