Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>

typedef struct U
{
	tm L;
	int F,t;
}U;

tm set(int M,int D,int h,int m)
{
	tm t={0,m,h,D,M,100,0};
	return t;
}

int N,i,j,G,M,D,h,m,u,R;
U X[1000];

int main()
{
	char f;
	for(;scanf("%d\n",&N),N;)
	{
		G=0;
		memset(X,0,sizeof(X));
		for(i=0;i<N;i++)
		{
			scanf("%2d/%2d%2d:%2d%*c%[IO]%d",&M,&D,&h,&m,&f,&u);
			tm tmp1=set(M,D,h,m);
			time_t tmp=mktime(&tmp1);
			if(f=='I')
			{
				if(u==0)
					G=1;
				else
				{
					X[u].F=1;
				}
				X[u].L=tmp1;
			}
			else
			{
				if(u==0)
				{
					
					for(j=1;j<1000;j++)
					{
						if(X[j].F==1)
						{
							long long aaa=mktime(&X[0].L);
							long long  bbb=mktime(&X[j].L);
							double eee=difftime(tmp,aaa)/60;
							double fff=difftime(tmp,bbb)/60;
							X[j].t+=fff<eee?fff:eee;
						}
					}
					G=0;
				}
				else
				{
					if(G==1)
					{
						long long aaa=mktime(&X[0].L);
						long long  bbb=mktime(&X[u].L);
						double eee=difftime(tmp,aaa)/60;
						double fff=difftime(tmp,bbb)/60;
						X[u].t+=fff<eee?fff:eee;
					}
					X[u].F=0;
					X[u].L=tmp1;
				}
			}
		}
		for(i=1,R=0;i<1000;i++)
			R=R<X[i].t?X[i].t:R;
		printf("%d\n",R);
	}
	return 0;
}

Compiler output:
main.c:8:9: error: unknown type name 'tm'
    8 |         tm L;
      |         ^~
main.c:5:1: note: 'tm' is defined in header '<time.h>'; this is probably fixable by adding '#include <time.h>'
    4 | #include<time.h>
  +++ |+#include <time.h>
    5 | 
main.c:12:1: error: unknown type name 'tm'; use 'struct' keyword to refer to the type
   12 | tm set(int M,int D,int h,int m)
      | ^~
      | struct 
main.c: In function 'set':
main.c:14:9: error: unknown type name 'tm'; use 'struct' keyword to refer to the type
   14 |         tm t={0,m,h,D,M,100,0};
      |         ^~
      |         struct 
main.c:14:17: warning: excess elements in scalar initializer
   14 |         tm t={0,m,h,D,M,100,0};
      |                 ^
main.c:14:17: note: (near initialization for 't')
main.c:14:19: warning: excess elements in scalar initializer
   14 |         tm t={0,m,h,D,M,100,0};
      |                   ^
main.c:14:19: note: (near initialization for 't')
main.c:14:21: warning: excess elements in scalar initializer
   14 |         tm t={0,m,h,D,M,100,0};
      |                     ^
main.c:14:21: note: (near initialization for 't')
main.c:14:23: warning: excess elements in scalar initializer
   14 |         tm t={0,m,h,D,M,100,0};
      |                       ^
main.c:14:23: note: (near initialization for 't')
main.c:14:25: warning: excess elements in scalar initializer
   14 |         tm t={0,m,h,D,M,100,0};
      |                         ^~~
main.c:14:25: note: (near initialization for 't')
main.c:14:29: warning: excess elements in scalar initializer
   14 |         tm t={0,m,h,D,M,100,0};
      |                             ^
main.c:14:29: note: (near initialization for 't')
main.c: In function 'main':
main.c:31:25: error: unknown type name 'tm'; use 'struct' keyword to refer to the type
   31 |                         tm tmp1=set(M,D,h,m);
      |                         ^~
      |                         struct 
main.c:32:43: error: passing argument 1 of 'mktime' from incompatible pointer type [-Wincompatible-pointer-types]
   32 |                         time_t tmp=mktime(&tmp1);
      |                                           ^~~~~
      |                                           |
      |                                           int *
In file included from main.c:4:
/usr/include/time.h:82:34: note: expected 'struct tm *' but argument is of type 'int *'
   82 | extern time_t mktime (struct tm *__tp) __THROW;
      |                       ~~~~~~~~~~~^~~~
main.c:52:78: error: passing argument 1 of 'mktime' from incompatible pointer type [-Wincompatible-pointer-types]
   52 |                                                         long long aaa=mktime(&X[0].L);
      |                                                                              ^~~~~~~
      |                                                                              |
      |                                                                              int *
/usr/include/time.h:82:34: note: expected 'struct tm *' but argument is of type 'int *'
   82 | extern time_t mktime (struct tm *__tp) __THROW;
      |                       ~~~~~~~~~~~^~~~
main.c:53:79: error: passing argument 1 of 'mktime' from incompatible pointer type [-Wincompatible-pointer-types]
   53 |                                                         long long  bbb=mktime(&X[j].L);
      |                                                                               ^~~~~~~
      |                                                                               |
      |                                                                               int *
/usr/include/time.h:82:34: note: expected 'struct tm *' but argument is of type 'int *'
   82 | extern time_t mktime (struct tm *__tp) __THROW;
      |                       ~~~~~~~~~~~^~~~
main.c:65:70: error: passing argument 1 of 'mktime' from incompatible pointer type [-Wincompatible-pointer-types]
   65 |                                                 long long aaa=mktime(&X[0].L);
      |                                                                      ^~~~~~~
      |                                                                      |
      |                                                                      int *
/usr/include/time.h:82:34: note: expected 'struct tm *' but argument is of type 'int *'
   82 | extern time_t mktime (struct tm *__tp) __THROW;
      |                       ~~~~~~~~~~~^~~~
main.c:66:71: error: passing argument 1 of 'mktime' from incompatible pointer type [-Wincompatible-pointer-types]
   66 |                                                 long long  bbb=mktime(&X[u].L);
      |                                                                       ^~~~~~~
      |                                                                       |
      |                                                                       int *
/usr/include/time.h:82:34: note: expected 'struct tm *' but argument is of type 'int *'
   82 | extern time_t mktime (struct tm *__tp) __THROW;
      |                       ~~~~~~~~~~~^~~~