Language: C++

#include<bits/stdc++.h>
using namespace std;
int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:125: error: reference to 'tm' is ambiguous
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |                                                                                                                             ^~
In file included from /usr/include/time.h:39,
                 from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/streambuf:43,
                 from /usr/include/c++/14/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/14/iterator:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:3:7: note:                 'int tm [1001]'
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |       ^~
a.cc:3:137: error: reference to 'tm' is ambiguous
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |                                                                                                                                         ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:3:7: note:                 'int tm [1001]'
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |       ^~
a.cc:3:143: error: reference to 'tm' is ambiguous
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |                                                                                                                                               ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:3:7: note:                 'int tm [1001]'
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |       ^~
a.cc:3:157: error: reference to 'tm' is ambiguous
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |                                                                                                                                                             ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:3:7: note:                 'int tm [1001]'
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |       ^~
a.cc:3:171: error: reference to 'tm' is ambiguous
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |                                                                                                                                                                           ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:3:7: note:                 'int tm [1001]'
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |       ^~
a.cc:3:202: error: reference to 'tm' is ambiguous
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |                                                                                                                                                                                                          ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:3:7: note:                 'int tm [1001]'
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |       ^~
a.cc:3:221: error: reference to 'tm' is ambiguous
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |                                                                                                                                                                                                                             ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:3:7: note:                 'int tm [1001]'
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |       ^~
a.cc:3:233: error: reference to 'tm' is ambiguous
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |                                                                                                                                                                                                                                         ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:3:7: note:                 'int tm [1001]'
    3 | int n,tm[1001]; char c1[1001],c2[1001],c3[1001]; int main() {int ans = 0; cin>>n>>c1>>c2>>c3; for(int i=0;i<n;i++) { memset(tm,0,sizeof(tm)); tm[ c1[i] ]++;tm[ c2[i] ]++;tm[ c3[i] ]++; ans += 3 - max( tm[ c1[i] ] , max( tm[ c2[i] ],tm[ c3[i] ] )  );   }  cout<<ans;  }
      |       ^~