Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>

using namespace std;

map<int,string> name;
int time[40][40];
int point[40][40];

int main() {
	int n;
	for(;;){
		cin>>n;
		if(n==0)break;
		name.clear();
		memset(time,0,sizeof(time));
		memset(point,0,sizeof(point));
		for(int i=0;i<n;++i){
			string nm;
			cin>>nm;
			name[i]=nm;
			int m;
			cin>>m;
			for(int j=0;j<m;++j){
				int x;
				cin>>x;
				time[i][x]=1;
			}
		}
		for(int i=0;i<n;++i){
			for(int j=0;j<30;++j){
				if(time[i][j]==0)continue;
				int cnt=0;
				for(int k=0;k<n;++k){
					cnt+=time[k][j];
				}
				point[i][j]=n+1-cnt;
			}
		}
		int mn=100100100,res=0;
		for(int i=0;i<n;++i){
			int cnt=0;
			for(int j=0;j<30;++j)cnt+=point[i][j];
			if(mn>cnt){
				res=i;
				mn=cnt;
			}else if(mn==cnt){
				if(name[res]>name[i]){
					res=i;
				}
			}
		}
		cout<<mn<<" "<<name[res]<<endl;
	}
	return 0;
}

Compiler output:
a.cc:23:16: error: 'int time [40][40]' redeclared as different kind of entity
   23 | int time[40][40];
      |                ^
In file included 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/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:6:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
a.cc: In function 'int main()':
a.cc:32:38: error: ISO C++ forbids applying 'sizeof' to an expression of function type [-fpermissive]
   32 |                 memset(time,0,sizeof(time));
      |                                     ~^~~~~
a.cc:32:24: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'void*' [-fpermissive]
   32 |                 memset(time,0,sizeof(time));
      |                        ^~~~
      |                        |
      |                        time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:3:
/usr/include/string.h:61:28: note:   initializing argument 1 of 'void* memset(void*, int, size_t)'
   61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
      |                      ~~~~~~^~~
a.cc:43:39: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   43 |                                 time[i][x]=1;
      |                                       ^
a.cc:43:42: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   43 |                                 time[i][x]=1;
      |                                          ^
a.cc:43:43: error: assignment of read-only location '*(time + (((sizetype)i) + ((sizetype)x)))'
   43 |                                 time[i][x]=1;
      |                                 ~~~~~~~~~~^~
a.cc:48:42: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   48 |                                 if(time[i][j]==0)continue;
      |                                          ^
a.cc:48:45: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   48 |                                 if(time[i][j]==0)continue;
      |                                             ^
a.cc:51:52: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   51 |                                         cnt+=time[k][j];
      |                                                    ^
a.cc:51:55: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   51 |                                         cnt+=time[k][j];
      |                                                       ^
a.cc:51:44: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   51 |                                         cnt+=time[k][j];
      |                                         ~~~^~~~~~~~~~~~
a.cc:51:44: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
   51 |                                         cnt+=time[k][j];
      |                                         ~~~^~~~~~~~~~~~
      |                                            |
      |                                            time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}