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;


#define rep(i,n) for(int i=0;i<(n);++i)
#define repd(i,n) for(int i=(n)-1;i>=0;+--)
#define repn(i,m,n) for(int i=(m);i<=(n);++i)
#define repnd(i,m,n) for(int i=(n)-1;i>=(m);+--)
#define rep0(i,n) for(i=0;i<(n);++i)
#define all(n) n.begin(),n.end()
#define sz(n) ((int)(n).size())

const int INF = 2147483647;
const double EPS = 1e-10;
const double PI = acos(-1.0);

const int dx[]={1,-1,0,0,1,-1,1,-1,0};
const int dy[]={0,0,1,-1,1,-1,-1,1,0};

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

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

Compiler output:
a.cc:39:16: error: 'int time [40][40]' redeclared as different kind of entity
   39 | 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:48:38: error: ISO C++ forbids applying 'sizeof' to an expression of function type [-fpermissive]
   48 |                 memset(time,0,sizeof(time));
      |                                     ~^~~~~
a.cc:48:24: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'void*' [-fpermissive]
   48 |                 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:59:39: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   59 |                                 time[i][x]=1;
      |                                       ^
a.cc:59:42: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   59 |                                 time[i][x]=1;
      |                                          ^
a.cc:59:43: error: assignment of read-only location '*(time + (((sizetype)i) + ((sizetype)x)))'
   59 |                                 time[i][x]=1;
      |                                 ~~~~~~~~~~^~
a.cc:64:42: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   64 |                                 if(time[i][j]==0)continue;
      |                                          ^
a.cc:64:45: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   64 |                                 if(time[i][j]==0)continue;
      |                                             ^
a.cc:67:54: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   67 |                                         count+=time[k][j];
      |                                                      ^
a.cc:67:57: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   67 |                                         count+=time[k][j];
      |                                                         ^
a.cc:67:46: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   67 |                                         count+=time[k][j];
      |                                         ~~~~~^~~~~~~~~~~~
a.cc:67:46: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
   67 |                                         count+=time[k][j];
      |                                         ~~~~~^~~~~~~~~~~~
      |                                              |
      |                                              time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}