Submission #1794248
Source Code Expand
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int,int> pii; #define rep(i,n) for(ll i=0;i<(ll)(n);i++) #define all(a) (a).begin(),(a).end() #define pb emplace_back #define INF (1e9+1) int main(){ int n; cin>>n; vector<int> v(n); rep(i,n)cin>>v[i]; vector<int> t(100001,0); rep(i,v.size()){ t[v[i]]++; t[v[i]+1]++; t[v[i]+2]++; } cout<<*max_element(all(t))<<endl; }
Submission Info
Submission Time | |
---|---|
Task | C - Together |
User | Yazaten |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 497 Byte |
Status | AC |
Exec Time | 30 ms |
Memory | 1152 KB |
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 | 1 ms | 640 KB |
0_001.txt | AC | 1 ms | 640 KB |
0_002.txt | AC | 1 ms | 640 KB |
1_003.txt | AC | 1 ms | 640 KB |
1_004.txt | AC | 18 ms | 1024 KB |
1_005.txt | AC | 30 ms | 1024 KB |
1_006.txt | AC | 30 ms | 1024 KB |
1_007.txt | AC | 30 ms | 1024 KB |
1_008.txt | AC | 30 ms | 1152 KB |