# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1160763 | ffresh | 역사적 조사 (JOI14_historical) | C++20 | 3712 ms | 11704 KiB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int SQ = 400;
struct Query
{
int l, r, idx;
};
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, q;
cin >> n >> q;
vector<int> a(n + 1);
for (int i = 1; i <= n; i++)
cin >> a[i];
vector<int> comp(a.begin() + 1, a.end());
sort(comp.begin(), comp.end());
comp.erase(unique(comp.begin(), comp.end()), comp.end());
auto getIdx = [&](int x)
{ return int(lower_bound(comp.begin(), comp.end(), x) - comp.begin()); };
int m = comp.size();
vector<int> tot(m, 0);
for (int i = 1; i <= n; i++)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |