Submission #5948340
Source Code Expand
import numpy as np N = int(input()) A = np.array(input().split(), dtype = np.int32) counter = np.bincount(A) B = counter.copy() # そのままとる B[1:] += counter[:-1] # 1増やして回収 B[:-1] += counter[1:] # 1減らして回収 answer = B.max() print(answer)
Submission Info
Submission Time | |
---|---|
Task | C - Together |
User | maspy |
Language | Python (3.4.3) |
Score | 300 |
Code Size | 279 Byte |
Status | AC |
Exec Time | 172 ms |
Memory | 21812 KiB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
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 | 146 ms | 12484 KiB |
0_001.txt | AC | 146 ms | 12484 KiB |
0_002.txt | AC | 147 ms | 12980 KiB |
1_003.txt | AC | 147 ms | 13236 KiB |
1_004.txt | AC | 162 ms | 13748 KiB |
1_005.txt | AC | 170 ms | 21480 KiB |
1_006.txt | AC | 172 ms | 21432 KiB |
1_007.txt | AC | 170 ms | 21440 KiB |
1_008.txt | AC | 170 ms | 21812 KiB |