```cpp
#include <bits/stdc++.h>
using namespace std;
const int maxn=10010;
long long c[maxn];
int main (){
int n,p,h,m;
cin>>n>>p>>h>>m;
memset(c,0,sizeof(c));
for (int i=1;i<=m;i++)
{
int a,b;
cin>>a>>b;
if(a<=b)
for (int j=a+1;j<=b-1;j++)
{
c[j]++;
}
else
for(int j=b+1;j<=a-1;j++)
{
c[j]++;
}
}
for (int i=1;i<=n;i++)
{
cout<<h-c[i]<<endl;
}
}
```
by world_romantic_xebec @ 2018-10-17 16:36:39
不用了,我是辣鸡,突然看懂了!
by world_romantic_xebec @ 2018-10-17 16:38:22
捕捉
by x义x @ 2018-10-17 16:49:24
@[world_romantic_xebec](/space/show?uid=89545) 您不弱,我才是最弱的
by 土田共戈 @ 2018-10-17 16:50:02
@[土田共戈](/space/show?uid=68085) %dalao
by x义x @ 2018-10-17 16:52:46
@[土田共戈](/space/show?uid=68085) 我才是呢!!!
by world_romantic_xebec @ 2018-10-17 16:59:29