Re: ID: 8007
Posted by BeeSuonCha
at 2022-09-27 16:46:46
#include<bits/stdc++.h>
using namespace std;
int L,N,P,K;
int i,t,temp;
int a[1001];
main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
//freopen("OREHNJACA.INP","r",stdin);
//freopen("OREHNJACA.OUT","w",stdout);
cin>>L;
cin>>N;
i=1;
while(i<=N)
{
cin>>P>>K;
for(t=P; t<=K; t=t+1)
{
if(a[t]!=0) t++;
else a[t]=i;
}
i++;
}
}
Hiện tại đã code đến đây
Followed by
- Re: Re: ID: 8007 (11) tranduyanh88 2022-12-24 00:31:20
- Re: 8007 (15) tranduyanh88 2022-12-24 00:31:59
- Re: Re: ID: 8007 (15) tranduyanh88 2022-12-24 00:32:14
- Re: Re: ID: 8007 (15) tranduyanh88 2022-12-24 00:33:22
- Re: Re: ID: 8007 (15) tranduyanh88 2022-12-24 00:33:28