Submission #1559169


Source Code Expand

# -*- coding: utf-8 -*-
from collections import Counter
N = int(input())
A = tuple(map(int, input().split()))

c0 = Counter()
c1 = Counter()
c2 = Counter()
for a in A:
    c0[(a+0)//3] += 1
    c1[(a+1)//3] += 1
    c2[(a+2)//3] += 1
    
print(max(sorted(c0.values(), reverse = True)[0],
          sorted(c1.values(), reverse = True)[0],
          sorted(c2.values(), reverse = True)[0]))  

Submission Info

Submission Time
Task C - Together
User nadare881
Language Python (3.4.3)
Score 300
Code Size 408 Byte
Status AC
Exec Time 240 ms
Memory 16292 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 9
Set Name Test Cases
Sample 0_000.txt, 0_001.txt, 0_002.txt
All 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt
Case Name Status Exec Time Memory
0_000.txt AC 85 ms 3444 KB
0_001.txt AC 20 ms 3316 KB
0_002.txt AC 21 ms 3316 KB
1_003.txt AC 51 ms 3444 KB
1_004.txt AC 153 ms 5404 KB
1_005.txt AC 209 ms 14348 KB
1_006.txt AC 185 ms 14344 KB
1_007.txt AC 218 ms 14344 KB
1_008.txt AC 240 ms 16292 KB