Language: C++

#include "pch.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>

#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <utility>
#include <queue>
#include <algorithm>
#include <functional>
#include <string>
#include <bitset>

#define ll long long
#define fri(n) for(i=0;i<(n);i++)
#define frj(n) for(j=0;j<(n);i++)
#define min(p,q) ((p)<(q)?(p):(q))
#define max(p,q) ((p)>(q)?(p):(q))
#define INF 1000000000000000000//10^18
#define INFINT 2000000001//2*10^9+1
#define MOD 1000000007
#define MODANOTHER 998244353
#define PI acos(-1)

using namespace std;

struct bangumi_t{
	int s;
	int t;
	int c;
};


int compare_channel(const void *a, const void *b) {//降順と昇順あってる？？
	struct bangumi_t *A = (struct bangumi_t *)a;
	struct bangumi_t *B = (struct bangumi_t *)b;
	if(A->c - B->c >0){
		return 1;
	}else if(A->c - B->c <0){
		return -1;
	}else{
		if(A->s - B->s >0){
			return 1;
		}else if(A->s - B->s <0){
			return -1;
		}else{
			return 0;
		}
	}
}

int compare_time(const void *a, const void *b) {//降順と昇順あってる？？
	struct bangumi_t *A = (struct bangumi_t *)a;
	struct bangumi_t *B = (struct bangumi_t *)b;
	if(A->s - B->s >0){
		return 1;
	}else if(A->s - B->s <0){
		return -1;
	}else{
		if(A->t - B->t >0){
			return 1;
		}else if(A->t - B->t <0){
			return -1;
		}else{
			return 0;
		}
	}
}

int main(void)
{
	//変数の宣言
	int n,m;
	static struct bangumi_t bangumi[100010];
	auto c = [](bangumi_t l, bangumi_t r){
		if(l.s - r.s >0){
			return true;
		}else if(l.s - r.s <0){
			return false;
		}else{
			if(l.t - r.t >0){
				return true;
			}else if(l.t - r.t <0){
				return false;
			}else{
				return false;
			}
		}
	};
	static priority_queue<bangumi_t,vector<bangumi_t>,decltype(c)> pque(c);
	struct bangumi_t b;

	//よく使う変数
	int i,j,k,l;
	int flag=0;
	int ans=0;
	int count=0;
	int temp=0;
	int temp1=0;
	int temp2=0;
	int temp3=0;
	int max=0;
	int min=INFINT;
	int len=0;
	int sum=0;
	int ok=0;
	int ng=0;
	char dummy;
	char stemp[11];
	
	//データの読み込み


//	scanf("%d %d",&n,&m);
	scanf_s("%d %d",&n,&m);

//	scanf("%s",&s);
//	scanf_s("%s",&s,5);


	for(i=0;i<n;i++){
//		scanf("%d %d %d",&temp1,&temp2,&temp3);
		scanf_s("%d %d %d",&temp1,&temp2,&temp3);

		bangumi[i].s=temp1;
		bangumi[i].t=temp2;
		bangumi[i].c=temp3;
	}


/*	for(i=0;i<n;i++){
//		scanf("%d",&c[i]);
		scanf_s("%d",&c[i]);
		d[i]=0;
	}*/


	//	printf("nは%dです\n", n);
	//	printf("データの読み込み終了\n");
	//実際の処理

//	clock_t start=clock();

	qsort(bangumi,n,sizeof(struct bangumi_t),compare_channel);
	
	count=0;
	for(i=0;i<n;i++){
		temp=i;
		while(temp!=n-1&&bangumi[temp].c==bangumi[temp+1].c&&bangumi[temp].t==bangumi[temp].s){
			temp++;
		}
		bangumi[count].s=bangumi[i].s;
		bangumi[count].t=bangumi[temp].t;
		bangumi[count].c=bangumi[i].c;
		count++;
		i=temp;
	}

	n=count;
	
	qsort(bangumi,n,sizeof(struct bangumi_t),compare_time);

	for(i=0;i<n;i++){
		if(i==0){
			pque.push(bangumi[i]);
		}else{
			b=pque.top();
			if(b.t<bangumi[i].s){
				pque.pop();
				pque.push(bangumi[i]);
			}else{
				pque.push(bangumi[i]);
			}
		}
	}

//	clock_t end=clock();


	//	printf("計算部分終了\n");

	//出力

	temp1=pque.size();
	printf("%d",temp1);

//	printf("time=%lf",(double)(end-start)/CLOCKS_PER_SEC);
	//	printf("結果の出力終了\n");

	return 0;
}



Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.