結果
| 問題 |
No.3287 Golden Ring
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-10-05 19:33:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,883 bytes |
| コンパイル時間 | 475 ms |
| コンパイル使用メモリ | 82,412 KB |
| 実行使用メモリ | 67,752 KB |
| 最終ジャッジ日時 | 2025-10-05 19:33:51 |
| 合計ジャッジ時間 | 4,312 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | RE * 14 |
ソースコード
from sortedcontainers import SortedDict, SortedList, SortedSet
from collections import Counter, deque, defaultdict
from heapq import heapify, heappop, heappush, nlargest, nsmallest
from bisect import bisect_left, bisect, bisect_right
from itertools import permutations, combinations, combinations_with_replacement, product, accumulate
from more_itertools import pairwise, windowed, powerset, distinct_permutations, set_partitions
from math import gcd, lcm, isqrt
from string import ascii_lowercase, ascii_uppercase, digits
from copy import deepcopy
from time import perf_counter
from functools import lru_cache, cache, reduce, cmp_to_key, total_ordering
import sys
import os
from typing import Any, List, Callable
import pypyjit
from atcoder.fenwicktree import FenwickTree
from atcoder.segtree import SegTree
from atcoder.lazysegtree import LazySegTree
from atcoder.string import suffix_array, lcp_array, z_algorithm
from atcoder.math import inv_mod, crt, floor_sum
from atcoder.convolution import convolution, convolution_int
from atcoder.modint import ModContext, Modint
from atcoder.dsu import DSU
from atcoder.maxflow import MFGraph
from atcoder.mincostflow import MCFGraph
from atcoder.scc import SCCGraph
from atcoder.twosat import TwoSAT
IS_LOCAL = os.environ.get("LOCAL") == "true"
def debug(*args, sep=" ", end="\n", flush=False) -> None:
if IS_LOCAL:
print(*args, sep=sep, end=end, file=sys.stderr, flush=flush)
def yn(flg: bool) -> bool:
print('Yes' if flg else 'No')
return flg
def main():
readline = sys.stdin.readline
inf = 1e18
MOD = 998244353
N = int(readline())
if N == 2:
yn(False)
elif N % 2 == 1:
yn(True)
print(*range(1, N + 1))
else:
yn(True)
A = list(range(1, N + 1))
A[-1], A[-2] = A[-2], A[-1]
print(*A)
if __name__ == "__main__":
main()