# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
137131 | KLPP | Poklon (COCI17_poklon) | C++14 | 1975 ms | 15116 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
typedef long long int lld;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define block 700
int n,q;
int arr[1000000];
multiset<int> m;
struct queries{
int l,r;
int index;
};
bool operator <(queries a, queries b){
if(a.l/block<b.l/block)return true;
if(a.l/block>b.l/block)return false;
return (a.r<b.r);
}
queries Q[1000000];
int L,R;
int freq[1000000];
int ans;
void Rplus(){
R++;
ans-=(freq[arr[R]]==2);
freq[arr[R]]++;
ans+=(freq[arr[R]]==2);
}
void Lminus(){
L--;
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |