CSP题解|201509-1 数列分段|100分
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;cin>>n;
int last,temp;
cin>>last;
int res=1;
while(cin>>temp){
if(temp!=last)res++;
last=temp;
}
cout<<res<<endl;
}
输入的n直接丢弃
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;cin>>n;
int last,temp;
cin>>last;
int res=1;
while(cin>>temp){
if(temp!=last)res++;
last=temp;
}
cout<<res<<endl;
}
输入的n直接丢弃
相关推荐
用微笑面对困难:确实比较烂,可以这么修改:加上大学的qs排名,然后大学简介要写一些,然后硕士大学加大加粗,科研经历第一句话都写上在复旦大学时,主要负责xxxx,简历左上角把学校logo写上,建议用复旦大学的简历模板