Submission #1986113


Source Code Expand

Copy
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define MOD 1000000007
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

typedef vector<int> vi;
typedef pair<int,int> pii;

int main(void) {
  int i,j;
  int n,c;
  cin>>n>>c;
  int t_max=2*100000+5;
  vi imos(t_max,0);
  rep(i,n){
    int a,b,c;
    cin>>a>>b>>c;
    a*=2;
    b*=2;
    imos[a-1]++;
    imos[b+1]--;
  }
  rep(i,t_max-1)imos[i+1]+=imos[i];
  int ans=0;
  rep(i,t_max)ans=max(ans,imos[i]);
  cout<<ans<<endl;
}

Submission Info

Submission Time
Task D - Recording
User rika0384
Language C++14 (GCC 5.4.1)
Score 0
Code Size 943 Byte
Status
Exec Time 75 ms
Memory 1024 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01.txt, sample_02.txt, sample_03.txt
All 0 / 400 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
01.txt 74 ms 1024 KB
02.txt 74 ms 1024 KB
03.txt 74 ms 1024 KB
04.txt 74 ms 1024 KB
05.txt 72 ms 1024 KB
06.txt 38 ms 1024 KB
07.txt 27 ms 1024 KB
08.txt 2 ms 1024 KB
09.txt 74 ms 1024 KB
10.txt 74 ms 1024 KB
11.txt 74 ms 1024 KB
12.txt 2 ms 1024 KB
13.txt 2 ms 1024 KB
14.txt 2 ms 1024 KB
15.txt 2 ms 1024 KB
16.txt 74 ms 1024 KB
17.txt 74 ms 1024 KB
18.txt 74 ms 1024 KB
19.txt 75 ms 1024 KB
sample_01.txt 2 ms 1024 KB
sample_02.txt 2 ms 1024 KB
sample_03.txt 2 ms 1024 KB