破代码
Kazuha_feywaye · · 个人记录
#include<bits/stdc++.h>
#define ll long long
using namespace std;
struct node{
ll x,y;
}arr[1000086],brr[1000086];
ll crr[100086],tot,tot1,tot2,drr[100086],err[100086],frr[100086];
int cmp(node a,node b)
{
if(a.y==b.y) return a.x<b.x;
return a.y>b.y;
}
int main()
{
freopen("ly.in","r",stdin);
freopen("ly.out","w",stdout);
ll n,m;
cin>>n>>m;
for(int i=1;i<=n;i++)
{
char c;
ll a,b;
cin>>c>>a>>b;
crr[++tot]=a;
if(c=='B')
{
arr[++tot1].x=a;
arr[tot1].y=b;
}
else if(c=='S')
{
brr[++tot2].x=a;
brr[tot2].y=b;
}
}
sort(crr+1,crr+tot+1);
int cnt=0;
for(int i=1;i<=tot;i++) if(crr[i]!=crr[i-1]) drr[++cnt]=crr[i];
for(int i=1;i<=tot1;i++)
{
int xx=lower_bound(drr+1,drr+cnt+1,arr[i].x)-drr;
}
return 0;
}