# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
6775 | woqja125 | 역사적 조사 (JOI14_historical) | C++98 | 1400 ms | 136732 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
#include<map>
int imp[100501];
int impNum[100501];
int num[100501];
int dp[330][330];
int cnt[330][100001];
int chk[100001];
int main()
{
int n, r, q, impC = 0;
scanf("%d%d", &n, &q);
for(int i=1; i<=n; i++) scanf("%d", &imp[i]);
std::map<int, int> A;
for(int i=1; i<=n; i++)
{
if(A.find(imp[i]) == A.end())
{
A.insert(std::make_pair(imp[i], ++impC));
num[i] = impC;
impNum[impC] = imp[i];
}
else
{
num[i] = A[imp[i]];
}
}
for(r=1; r*r < n; r++);
for(int i=1; i<=r; 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... |