結果

問題 No.1256 連続整数列
ユーザー CyanmondCyanmond
提出日時 2020-10-16 23:03:23
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 3,981 bytes
コンパイル時間 1,019 ms
コンパイル使用メモリ 111,764 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-28 08:18:22
合計ジャッジ時間 1,771 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 1 ms
4,376 KB
testcase_19 AC 1 ms
4,376 KB
testcase_20 AC 1 ms
4,380 KB
testcase_21 AC 1 ms
4,380 KB
testcase_22 AC 1 ms
4,376 KB
testcase_23 AC 1 ms
4,380 KB
testcase_24 AC 1 ms
4,380 KB
testcase_25 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//#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;
}
0