Skip to content

Instantly share code, notes, and snippets.

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
**/
int main()
{
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
**/
int main()
{
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
int times[1000001],indst[1000001],inden[1000001],n,i,f,maxn,max;
maxn=-1;
scanf("%d",&n);
memset(times, 0, 1000001*sizeof(int));
for(i=0;i<n;i++)