結果
問題 | No.1242 高橋君とすごろく |
ユーザー | wolgnik |
提出日時 | 2020-10-02 23:08:56 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,004 bytes |
コンパイル時間 | 344 ms |
コンパイル使用メモリ | 87,024 KB |
実行使用メモリ | 76,092 KB |
最終ジャッジ日時 | 2023-09-24 23:01:45 |
合計ジャッジ時間 | 3,793 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 71 ms
71,208 KB |
testcase_01 | AC | 69 ms
71,248 KB |
testcase_02 | AC | 74 ms
76,064 KB |
testcase_03 | AC | 73 ms
71,324 KB |
testcase_04 | AC | 71 ms
71,536 KB |
testcase_05 | AC | 75 ms
75,592 KB |
testcase_06 | AC | 68 ms
71,272 KB |
testcase_07 | AC | 70 ms
71,220 KB |
testcase_08 | AC | 68 ms
71,232 KB |
testcase_09 | AC | 69 ms
71,288 KB |
testcase_10 | AC | 68 ms
71,436 KB |
testcase_11 | AC | 88 ms
75,956 KB |
testcase_12 | AC | 68 ms
71,120 KB |
testcase_13 | AC | 86 ms
75,956 KB |
testcase_14 | AC | 68 ms
71,360 KB |
testcase_15 | AC | 89 ms
75,952 KB |
testcase_16 | AC | 88 ms
75,680 KB |
testcase_17 | AC | 66 ms
71,216 KB |
testcase_18 | AC | 71 ms
75,572 KB |
testcase_19 | AC | 73 ms
75,836 KB |
testcase_20 | WA | - |
testcase_21 | AC | 72 ms
71,212 KB |
testcase_22 | AC | 89 ms
75,836 KB |
testcase_23 | AC | 89 ms
75,996 KB |
testcase_24 | AC | 88 ms
76,092 KB |
testcase_25 | AC | 88 ms
75,676 KB |
testcase_26 | AC | 68 ms
71,096 KB |
testcase_27 | AC | 70 ms
71,080 KB |
ソースコード
import sys input = sys.stdin.readline N, K = map(int, input().split()) a = set(map(int, input().split())) for x in a: if (x + 1) in a: if x - 8 >= 1: print("No") exit(0) if (x + 3) in a: if x - 5 >= 1: print("No") exit(0) if (x + 5) in a: if x - 6 >= 1: print("No") exit(0) #print(a) for _ in range(200): t = set() for i in a: for j in a: if j - i == 1 and (i - 3 > 0): t.add(i - 3) if j - i == 3 and (i - 2 > 0): t.add(i - 2) if j - i == 5 and (i - 1 > 0): t.add(i - 1) if 1 in t: print("No") exit(0) a |= t for x in a: if (x + 1) in a: if x - 8 >= 1: print("No") exit(0) if (x + 3) in a: if x - 5 >= 1: print("No") exit(0) if (x + 5) in a: if x - 6 >= 1: print("No") exit(0) sa = sorted(a) #print(sa) for i in range(len(sa)): if i + 3 >= len(sa): continue if sa[i + 3] - sa[i] == 3: print("No") exit(0) if 1 in a: print("No") else: print("Yes")