#include<bits/stdc++.h>
using namespace std;
int scs(int x){
int i=0;
while(x!=0){
i++;
x=x/10;
}
return i;
}
int tcl(int x,int i){
int m=0;
for(int n=i;n>0;n--){
int b=x%10;
if(b%2!=n%2) m++;
x/=10;
}
return m;
}
int main(){
int a;
cin<<a;
int s=scs(a);
int lc=tcl(a,s);
if(lc==0) cout<<"YES";
else cout<<"NO";
}
Lỗi đây ạ:
multiple definition of `main'; /tmp/ccD2HbxC.o:main.cpp:(.text+0xde): first defined here
collect2: error: ld returned 1 exit status