結果
問題 | No.1256 連続整数列 |
ユーザー |
|
提出日時 | 2020-10-16 23:03:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 3,981 bytes |
コンパイル時間 | 1,125 ms |
コンパイル使用メモリ | 114,092 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-21 02:47:30 |
合計ジャッジ時間 | 1,931 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 |
ソースコード
//#pragma GCC target("avx")//#pragma GCC optimize("O3")//#pragma GCC optimize("unroll-loops")#include <algorithm>#include <bitset>#include <tuple>#include <cstdint>#include <cctype>#include <assert.h>#include <time.h>#include <stdlib.h>#include <stdio.h>#include <cassert>#include <cfloat>#include <climits>#include <cmath>#include <complex>#include <ctime>#include <deque>#include <fstream>#include <iostream>#include <iterator>#include <limits>#include <map>#include <memory>#include <queue>#include <random>#include <set>#include <stack>#include <string>#include <unordered_map>#include <unordered_set>#include <utility>#include <vector>#include <math.h>#include <cstring>#include <array>#include <iomanip>using namespace std;using lint = long long;const int dx[] = { 1,0,-1,0 };const int dy[] = { 0,1,0,-1 };const lint INF = 1ll << 60;const int mod = 1000000007;const lint lmod = 1000000007;template<int MOD> class fored {long long val;public:constexpr fored(long long vl = 0) noexcept :val(vl% MOD) {if (val < 0) val += MOD;}constexpr fored operator - () const noexcept {if (val) return MOD - val;else return 0;}constexpr fored operator + (const fored& l) const noexcept {return fored(*this) += l;}constexpr fored operator - (const fored& l) const noexcept {return fored(*this) -= l;}constexpr fored operator * (const fored& l) const noexcept {return fored(*this) *= l;}constexpr fored operator /(const fored& l) const noexcept {return fored(*this) /= l;}constexpr fored operator % (const fored& l) const noexcept {return fored(*this) %= l;}constexpr fored operator += (const fored& l) noexcept {val += l.val;if (val >= MOD) val -= MOD;return (*this);}constexpr fored operator ++ (int) {val++;if (val >= MOD) val -= MOD;return(*this);}constexpr fored operator -= (const fored& l) noexcept {val -= l.val;if (val < 0) val += MOD;return (*this);}constexpr fored operator -- (int) {val--;if (val < 0) val += MOD;return(*this);}constexpr fored operator *= (const fored& l) noexcept {val *= l.val;val %= MOD;return (*this);}constexpr fored& operator /= (const fored& l) noexcept {long long a = l.val, b = MOD, u = 1, v = 0;while (b) {long long t = a / b;a -= t * b; swap(a, b);u -= t * v; swap(u, v);}val *= u;val %= MOD;if (u < 0) u += MOD;return *this;}constexpr fored operator %= (const fored& l) noexcept {val %= l.val;return (*this);}constexpr bool operator == (const fored& l) const noexcept {return this->val == l.val;}constexpr bool operator != (const fored& l) const noexcept {return this->val != l.val;}constexpr bool operator > (const fored& l) const noexcept {return this->val > l.val;}constexpr bool operator < (const fored& l) const noexcept {return this->val < l.val;}constexpr bool operator >= (const fored& l) const noexcept {return this->val >= l.val;}constexpr bool operator <= (const fored& l) const noexcept {return this->val <= l.val;}friend constexpr ostream& operator << (ostream& os, const fored<MOD>& l) noexcept {return os << l.val;}friend istream& operator >> (istream& ist, fored<MOD>& l) {long long a; ist >> a;l = a;return ist;}friend constexpr fored<MOD> modpow(const fored<MOD>& l, long long n) noexcept {if (n == 0) return 1;auto t = modpow(l, n / 2);t = t * t;if (n & 1) t = t * l;return t;}constexpr fored<MOD> max(const fored<MOD>& a, const fored<MOD>& b) {if (a > b) return a;else return b;}constexpr fored<MOD> min(const fored<MOD>& a, const fored<MOD>& b) {if (a < b) return a;else return b;}constexpr int getMod() {return MOD;}constexpr void Mintswap(fored<MOD>& a, fored<mod>& b) {fored<MOD> c = a;a = b; b = c;}};int main(void) {lint a; cin >> a;if (a == 1) puts("NO");else puts("YES");return 0;}