# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1114477 | 2024-11-19T01:56:27 Z | ezzzay | Izbori (COCI22_izbori) | C++14 | 3000 ms | 1104 KB |
#include<bits/stdc++.h> using namespace std; const int N=3e5+5; int a[N]; signed main(){ int n; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } int cnt=0; for(int i=1;i<=n;i++){ map<int,int>mp; bool u=0; int mx=0; for(int j=i;j<=n;j++){ mp[a[j]]++; mx=max(mx,mp[a[j]]); cnt+=(mx*2>(j-i+1)); } } cout<<cnt; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Correct | 1 ms | 444 KB | Output is correct |
3 | Correct | 1 ms | 336 KB | Output is correct |
4 | Correct | 1 ms | 336 KB | Output is correct |
5 | Correct | 1 ms | 336 KB | Output is correct |
6 | Correct | 1 ms | 336 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Correct | 1 ms | 444 KB | Output is correct |
3 | Correct | 1 ms | 336 KB | Output is correct |
4 | Correct | 1 ms | 336 KB | Output is correct |
5 | Correct | 1 ms | 336 KB | Output is correct |
6 | Correct | 1 ms | 336 KB | Output is correct |
7 | Correct | 49 ms | 336 KB | Output is correct |
8 | Correct | 1 ms | 336 KB | Output is correct |
9 | Correct | 32 ms | 464 KB | Output is correct |
10 | Correct | 33 ms | 336 KB | Output is correct |
11 | Correct | 33 ms | 336 KB | Output is correct |
12 | Correct | 39 ms | 464 KB | Output is correct |
13 | Correct | 33 ms | 468 KB | Output is correct |
14 | Correct | 32 ms | 504 KB | Output is correct |
15 | Correct | 33 ms | 644 KB | Output is correct |
16 | Correct | 33 ms | 476 KB | Output is correct |
17 | Correct | 13 ms | 592 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3055 ms | 1104 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Correct | 1 ms | 444 KB | Output is correct |
3 | Correct | 1 ms | 336 KB | Output is correct |
4 | Correct | 1 ms | 336 KB | Output is correct |
5 | Correct | 1 ms | 336 KB | Output is correct |
6 | Correct | 1 ms | 336 KB | Output is correct |
7 | Correct | 49 ms | 336 KB | Output is correct |
8 | Correct | 1 ms | 336 KB | Output is correct |
9 | Correct | 32 ms | 464 KB | Output is correct |
10 | Correct | 33 ms | 336 KB | Output is correct |
11 | Correct | 33 ms | 336 KB | Output is correct |
12 | Correct | 39 ms | 464 KB | Output is correct |
13 | Correct | 33 ms | 468 KB | Output is correct |
14 | Correct | 32 ms | 504 KB | Output is correct |
15 | Correct | 33 ms | 644 KB | Output is correct |
16 | Correct | 33 ms | 476 KB | Output is correct |
17 | Correct | 13 ms | 592 KB | Output is correct |
18 | Execution timed out | 3055 ms | 1104 KB | Time limit exceeded |
19 | Halted | 0 ms | 0 KB | - |