| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 172703 | mosiashvililuka | Segments (IZhO18_segments) | C++14 | 5049 ms | 3720 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
int a,b,c,d,e,pi,t,tes,te,tp,i,j,zx,xc,pas;
pair <int, int> p[200009];
int main(){
ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
cin>>tes>>t;
for(te=1; te<=tes; te++){
cin>>tp;
if(tp==1){
cin>>c>>d;
c=(c^(t*pas));
d=(d^(t*pas));
if(d<c) swap(c,d);
pi++;
p[pi].first=c;p[pi].second=d;
}else{
if(tp==2){
cin>>c;
p[c].first=-1;p[c].second=-1;
}else{
cin>>c>>d>>e;
c=(c^(t*pas));
d=(d^(t*pas));
if(d<c) swap(c,d);
pas=0;
for(i=1; i<=pi; i++){
zx=max(p[i].first,c);
xc=min(p[i].second,d);
if(xc-zx+1>=e){
pas++;
}
}
cout<<pas<<endl;
}
}
}
return 0;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
