Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
108696 何松羽 整数去重 C++ Wrong Answer 1 MS 268 KB 291 2025-01-21 12:58:52

Tests(0/3):


Code:

#include<bits/stdc++.h> using namespace std; int a[1000010], n, cnt = 1, maxn; int main() { cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i]; if (a[i] == a[i - 1]) { cnt++; if (cnt > maxn)maxn = cnt; } else cnt = 1 ; } cout << maxn << endl; return 0; }


Run Info:

------Input------
5 10 12 93 12 75
------Answer-----
10 12 93 75
------Your output-----
0