今天写了道题P5639,虽然是我自己写的,但我总怕跟某些题解很像,然后棕名,现在不敢提交了
#include<bits/stdc++.h>
using namespace std;
int main(){
int m,n = 1,j = 0,k = 0;
cin>>m;
int a[m];
for(int i = 0;i<m;i++){
cin>>k;
if(k != j){
n++;
j = k;
}
a[i] = k;
}
cout<<n;
return 0;
}
有没有dada帮帮我怎么办(麻烦at我下,谢谢了)