結果
問題 |
No.2343 (l+r)/2
|
ユーザー |
|
提出日時 | 2023-06-09 21:46:32 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 610 bytes |
コンパイル時間 | 181 ms |
コンパイル使用メモリ | 82,144 KB |
実行使用メモリ | 88,700 KB |
最終ジャッジ日時 | 2025-01-02 02:44:52 |
合計ジャッジ時間 | 2,096 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 6 WA * 8 |
ソースコード
import sys sys.setrecursionlimit(5*10**5) input = sys.stdin.readline from collections import defaultdict, deque, Counter from heapq import heappop, heappush from bisect import bisect_left, bisect_right from math import gcd def sol(): n = int(input()) a = [2] + list(map(int,input().split())) rl = [] for i in range(1,n+1): if a[i] != a[i-1]: rl.append(1) else: rl[-1] += 1 if len(rl) % 2 == 0 or (len(rl) >= 3 and max(rl) >= 2): print('Yes') else: print('No') return T = int(input()) for i in range(T): sol()