提出 #74697181


ソースコード 拡げる

#ifndef HIDDEN_IN_VS // 折りたたみ用

// 警告の抑制
#define _CRT_SECURE_NO_WARNINGS

// ライブラリの読み込み
#include <bits/stdc++.h>
using namespace std;

// 型名の短縮
using ll = long long; using ull = unsigned long long; // -2^63 ~ 2^63 = 9e18(int は -2^31 ~ 2^31 = 2e9)
using pii = pair<int, int>;	using pll = pair<ll, ll>;	using pil = pair<int, ll>;	using pli = pair<ll, int>;
using vi = vector<int>;		using vvi = vector<vi>;		using vvvi = vector<vvi>;	using vvvvi = vector<vvvi>;
using vl = vector<ll>;		using vvl = vector<vl>;		using vvvl = vector<vvl>;	using vvvvl = vector<vvvl>;
using vb = vector<bool>;	using vvb = vector<vb>;		using vvvb = vector<vvb>;
using vc = vector<char>;	using vvc = vector<vc>;		using vvvc = vector<vvc>;
using vd = vector<double>;	using vvd = vector<vd>;		using vvvd = vector<vvd>;
template <class T> using priority_queue_rev = priority_queue<T, vector<T>, greater<T>>;
using Graph = vvi;

// 定数の定義
const double PI = acos(-1);
int DX[4] = { 1, 0, -1, 0 }; // 4 近傍(下,右,上,左)
int DY[4] = { 0, 1, 0, -1 };
int INF = 1001001001; ll INFL = 4004004003094073385LL; // (int)INFL = INF, (int)(-INFL) = -INF;

// 入出力高速化
struct fast_io { fast_io() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(18); } } fastIOtmp;

// 汎用マクロの定義
#define all(a) (a).begin(), (a).end()
#define sz(x) ((int)(x).size())
#define lbpos(a, x) (int)distance((a).begin(), std::lower_bound(all(a), (x)))
#define ubpos(a, x) (int)distance((a).begin(), std::upper_bound(all(a), (x)))
#define Yes(b) {cout << ((b) ? "Yes\n" : "No\n");}
#define rep(i, n) for(int i = 0, i##_len = int(n); i < i##_len; ++i) // 0 から n-1 まで昇順
#define repi(i, s, t) for(int i = int(s), i##_end = int(t); i <= i##_end; ++i) // s から t まで昇順
#define repir(i, s, t) for(int i = int(s), i##_end = int(t); i >= i##_end; --i) // s から t まで降順
#define repe(v, a) for(const auto& v : (a)) // a の全要素(変更不可能)
#define repea(v, a) for(auto& v : (a)) // a の全要素(変更可能)
#define repb(set, d) for(int set = 0, set##_ub = 1 << int(d); set < set##_ub; ++set) // d ビット全探索(昇順)
#define repis(i, set) for(int i = lsb(set), bset##i = set; i < 32; bset##i -= 1 << i, i = lsb(bset##i)) // set の全要素(昇順)
#define repp(a) sort(all(a)); for(bool a##_perm = true; a##_perm; a##_perm = next_permutation(all(a))) // a の順列全て(昇順)
#define uniq(a) {sort(all(a)); (a).erase(unique(all(a)), (a).end());} // 重複除去
#define EXIT(a) {cout << (a) << endl; exit(0);} // 強制終了
#define inQ(x, y, u, l, d, r) ((u) <= (x) && (l) <= (y) && (x) < (d) && (y) < (r)) // 半開矩形内判定

// 汎用関数の定義
template <class T> inline ll powi(T n, int k) { ll v = 1; rep(i, k) v *= n; return v; }
template <class T> inline bool chmax(T& M, const T& x) { if (M < x) { M = x; return true; } return false; } // 最大値を更新(更新されたら true を返す)
template <class T> inline bool chmin(T& m, const T& x) { if (m > x) { m = x; return true; } return false; } // 最小値を更新(更新されたら true を返す)
template <class T> inline int getb(T set, int i) { return (set >> i) & T(1); }
template <class T> inline T smod(T n, T m) { n %= m; if (n < 0) n += m; return n; } // 非負mod

// 演算子オーバーロード
template <class T, class U> inline istream& operator>>(istream& is, pair<T, U>& p) { is >> p.first >> p.second; return is; }
template <class T> inline istream& operator>>(istream& is, vector<T>& v) { repea(x, v) is >> x; return is; }
template <class T> inline vector<T>& operator--(vector<T>& v) { repea(x, v) --x; return v; }
template <class T> inline vector<T>& operator++(vector<T>& v) { repea(x, v) ++x; return v; }

#endif // 折りたたみ用


#if __has_include(<atcoder/all>)
#include <atcoder/all>
using namespace atcoder;

#ifdef _MSC_VER
#include "localACL.hpp"
#endif

using mint = modint998244353;
//using mint = static_modint<(int)1e9+7>;
//using mint = modint; // mint::set_mod(m);

using vm = vector<mint>; using vvm = vector<vm>; using vvvm = vector<vvm>; using vvvvm = vector<vvvm>; using pim = pair<int, mint>;
#endif


#ifdef _MSC_VER // 手元環境(Visual Studio)
#include "local.hpp"
#else // 提出用(gcc)
int mute_dump = 0;
int frac_print = 0;
#if __has_include(<atcoder/all>)
namespace atcoder {
	inline istream& operator>>(istream& is, mint& x) { ll x_; is >> x_; x = x_; return is; }
	inline ostream& operator<<(ostream& os, const mint& x) { os << x.val(); return os; }
}
#endif
inline int popcount(int n) { return __builtin_popcount(n); }
inline int popcount(ll n) { return __builtin_popcountll(n); }
inline int lsb(int n) { return n != 0 ? __builtin_ctz(n) : 32; }
inline int lsb(ll n) { return n != 0 ? __builtin_ctzll(n) : 64; }
inline int msb(int n) { return n != 0 ? (31 - __builtin_clz(n)) : -1; }
inline int msb(ll n) { return n != 0 ? (63 - __builtin_clzll(n)) : -1; }
#define dump(...)
#define dumpel(v)
#define dump_math(v)
#define input_from_file(f)
#define output_to_file(f)
#define Assert(b) { if (!(b)) { vc MLE(1<<30); rep(i,9)cout<<MLE[i]; exit(0); } } // RE の代わりに MLE を出す
#endif


//【正方行列(固定サイズ)】
/*
* Fixed_matrix<T, n>() : O(n^2)
*	T の要素を成分にもつ n×n 零行列で初期化する.
*
* Fixed_matrix<T, n>(bool identity = true) : O(n^2)
*	T の要素を成分にもつ n×n 単位行列で初期化する.
*
* Fixed_matrix<T, n>(vvT a) : O(n^2)
*	二次元配列 a[0..n)[0..n) の要素で初期化する.
*
* A + B : O(n^2)
*	n×n 行列 A, B の和を返す.+= も使用可.
*
* A - B : O(n^2)
*	n×n 行列 A, B の差を返す.-= も使用可.
*
* c * A / A * c : O(n^2)
*	n×n 行列 A とスカラー c のスカラー積を返す.*= も使用可.
*
* A * x : O(n^2)
*	n×n 行列 A と n 次元列ベクトル array<T, n> x の積を返す.
*
* x * A : O(n^2)(やや遅い)
*	n 次元行ベクトル array<T, n> x と n×n 行列 A の積を返す.
*
* A * B : O(n^3)
*	n×n 行列 A と n×n 行列 B の積を返す.
*
* Mat pow(ll d) : O(n^3 log d)
*	自身を d 乗した行列を返す.
*/
template <class T, int n>
struct Fixed_matrix {
	array<array<T, n>, n> v; // 行列の成分

	// n×n 零行列で初期化する.identity = true なら n×n 単位行列で初期化する.
	Fixed_matrix(bool identity = false) {
		rep(i, n) v[i].fill(T(0));
		if (identity) rep(i, n) v[i][i] = T(1);
	}

	// 二次元配列 a[0..n)[0..n) の要素で初期化する.
	Fixed_matrix(const vector<vector<T>>& a) {
		// verify : https://yukicoder.me/problems/no/1000

		Assert(sz(a) == n && sz(a[0]) == n);
		rep(i, n) rep(j, n) v[i][j] = a[i][j];
	}

	// 代入
	Fixed_matrix(const Fixed_matrix&) = default;
	Fixed_matrix& operator=(const Fixed_matrix&) = default;

	// アクセス
	inline array<T, n> const& operator[](int i) const { return v[i]; }
	inline array<T, n>& operator[](int i) { return v[i]; }

	// 入力
	friend istream& operator>>(istream& is, Fixed_matrix& a) {
		rep(i, n) rep(j, n) is >> a[i][j];
		return is;
	}

	// 比較
	bool operator==(const Fixed_matrix& b) const { return v == b.v; }
	bool operator!=(const Fixed_matrix& b) const { return !(*this == b); }

	// 加算,減算,スカラー倍
	Fixed_matrix& operator+=(const Fixed_matrix& b) {
		rep(i, n) rep(j, n) v[i][j] += b[i][j];
		return *this;
	}
	Fixed_matrix& operator-=(const Fixed_matrix& b) {
		rep(i, n) rep(j, n) v[i][j] -= b[i][j];
		return *this;
	}
	Fixed_matrix& operator*=(const T& c) {
		rep(i, n) rep(j, n) v[i][j] *= c;
		return *this;
	}
	Fixed_matrix operator+(const Fixed_matrix& b) const { return Fixed_matrix(*this) += b; }
	Fixed_matrix operator-(const Fixed_matrix& b) const { return Fixed_matrix(*this) -= b; }
	Fixed_matrix operator*(const T& c) const { return Fixed_matrix(*this) *= c; }
	friend Fixed_matrix operator*(const T& c, const Fixed_matrix& a) { return a * c; }
	Fixed_matrix operator-() const { return Fixed_matrix(*this) *= T(-1); }

	// 行列ベクトル積 : O(n^2)
	array<T, n> operator*(const array<T, n>& x) const {
		array<T, n> y{ 0 };
		rep(i, n) rep(j, n)	y[i] += v[i][j] * x[j];
		return y;
	}

	// ベクトル行列積 : O(n^2)
	friend array<T, n> operator*(const array<T, n>& x, const Fixed_matrix& a) {
		array<T, n> y{ 0 };
		rep(i, n) rep(j, n) y[j] += x[i] * a[i][j];
		return y;
	}

	// 積:O(n^3)
	Fixed_matrix operator*(const Fixed_matrix& b) const {
		// verify : https://yukicoder.me/problems/no/1000

		Fixed_matrix res;
		rep(i, n) rep(k, n) rep(j, n) res[i][j] += v[i][k] * b[k][j];
		return res;
	}
	Fixed_matrix& operator*=(const Fixed_matrix& b) { *this = *this * b; return *this; }

	// 累乗:O(n^3 log d)
	Fixed_matrix pow(ll d) const {
		// verify : https://yukicoder.me/problems/no/2810

		Fixed_matrix res(true), pow2(*this);
		while (d > 0) {
			if (d & 1) res *= pow2;
			pow2 *= pow2;
			d /= 2;
		}
		return res;
	}

#ifdef _MSC_VER
	friend ostream& operator<<(ostream& os, const Fixed_matrix& a) {
		rep(i, n) {
			os << "[";
			rep(j, n) os << a[i][j] << " ]"[j == n - 1];
			if (i < n - 1) os << "\n";
		}
		return os;
	}
#endif
};


//【有限体 F_p 上の計算(64 bit)】
/*
* 有限体 F_p 上ので様々な計算を行う.
* mll::set_mod(ll p) はあらゆる場所で使う法を書き換えてしまうので注意.
*
* 制約 : p は素数
*/
struct mll {
	// verify : https://judge.yosupo.jp/problem/factorize

	__int128 v;
	inline static __int128 MOD;

	// コンストラクタ
	mll() noexcept : v(0) {}
	mll(const mll& a) = default;
	mll(int a) noexcept : v(a% MOD) { if (v < 0) v += MOD; }
	mll(ll a) noexcept : v(a% MOD) { if (v < 0) v += MOD; }

	// 代入
	mll& operator=(const mll& a) = default;
	mll& operator=(int a) { v = a % MOD; if (v < 0) v += MOD; return *this; }
	mll& operator=(ll a) { v = a % MOD; if (v < 0) v += MOD; return *this; }

	// 入出力
	friend istream& operator>>(istream& is, mll& x) {
		ll tmp; is >> tmp; x.v = tmp % MOD; if (x.v < 0) x.v += MOD; return is;
	}
	friend ostream& operator<<(ostream& os, const mll& x) { os << (ll)x.v; return os; }

	// 比較(参考 : https://twitter.com/KakurenboUni/status/1717463221190414472)
	friend bool operator==(const mll& a, const mll& b) { return a.v == b.v; }
	friend bool operator!=(const mll& a, const mll& b) { return a.v != b.v; }

	// 単項演算
	mll operator-() const { mll a; if (v > 0) a.v = MOD - v; return a; }
	mll& operator++() { v++; if (v == MOD) v = 0; return *this; }
	mll operator++(int) { mll tmp = *this; ++(*this); return tmp; }
	mll& operator--() { v--; if (v == -1) v = MOD - 1; return *this; }
	mll operator--(int) { mll tmp = *this; --(*this); return tmp; }

	// 二項演算
	mll& operator+=(const mll& b) { v += b.v; if (v >= MOD) v -= MOD; return *this; }
	mll& operator-=(const mll& b) { v -= b.v; if (v < 0) v += MOD; return *this; }
	mll& operator*=(const mll& b) { v = (v * b.v) % MOD; return *this; }
	mll& operator/=(const mll& b) { *this *= b.inv(); return *this; }
	friend mll operator+(mll a, const mll& b) { a += b; return a; }
	friend mll operator-(mll a, const mll& b) { a -= b; return a; }
	friend mll operator*(mll a, const mll& b) { a *= b; return a; }
	friend mll operator/(mll a, const mll& b) { a /= b; return a; }

	// 累乗
	mll pow(ll d) const {
		mll res(1), pow2 = *this;
		while (d > 0) {
			if (d & 1) res *= pow2;
			pow2 *= pow2;
			d >>= 1;
		}
		return res;
	}

	// 逆元
	mll inv() const { Assert(v != 0); return pow((ll)(MOD - 2)); }

	// 法の設定,確認
	static void set_mod(ll MOD_) { Assert(MOD_ > 0); MOD = MOD_; }
	static ll mod() { return (ll)MOD; }

	// 値の確認
	ll val() const { return (ll)v; }
};


//【素数判定】O((log n)^3)
/*
* n が素数かを返す.
*
* 利用:【有限体 F_p 上の計算(64 bit)】
*/
bool miller_rabin(ll n) {
	// 参考 : https://nyaannyaan.github.io/library/prime/fast-factorize.hpp.html
	// verify : https://judge.yosupo.jp/problem/primality_test

	//【方法】
	// p を奇素数とすると,任意の a∈[1..p) についてフェルマーの小定理より
	//		a^(p-1) ≡ 1 (mod p)
	// となる.これの平方根を考えていくと,
	//		p-1 = 2^s d (d : 奇数)
	// と表せば,
	//		a^d ≡ 1 (mod p) or ∃r=[0..s), a^(2^r d) ≡ -1 (mod p)
	// と書き直せる.
	// 
	// この対偶を用いて判定することをランダムに選んだ a で繰り返す.
	// n < 2^64 に範囲を限定するなら擬素数を生じない a を固定的に選べる.

	const vl as = { 2, 325, 9375, 28178, 450775, 9780504, 1795265022 };

	if (n == 2 || n == 3 || n == 5 || n == 13 || n == 19 || n == 73 || n == 193
		|| n == 407521 || n == 299210837) return true;
	if (n == 1 || n % 2 == 0) return false;

	mll::set_mod(n);
	int s = 0; ll d = n - 1;
	while (d % 2 == 0) {
		s++;
		d /= 2;
	}

	repe(a, as) {
		mll powa = mll(a).pow(d);
		if (powa == 1 || powa == -1) goto LOOP_END;
		rep(r, s - 1) {
			powa *= powa;
			if (powa == 1) return false;
			if (powa == -1) goto LOOP_END;
		}
		return false;

	LOOP_END:;
	}

	return true;
}


//【約数検出】O(n^(1/4))
/*
* n の真の約数を何か 1 つ返す(失敗すれば n を返す)
*
* 制約 : n は非素数
*
* 利用:【有限体 F_p 上の計算(64 bit)】
*/
template <class T = ll>
T pollard_rho(T n) {
	// 参考 : https://qiita.com/Kiri8128/items/eca965fe86ea5f4cbb98
	// verify : https://judge.yosupo.jp/problem/factorize

	//【方法】
	// 適当な定数 c をとり関数 f : Z/nZ → Z/nZ を
	//		f(x) = x^2 + c
	// と定める.
	//
	// 適当な初期値 x[0] = y[0] (= 2) から始め,Z/nZ 上の数列を漸化式
	//		x[i+1] = f(x[i]), y[i+1] = f(f(y[i]))
	// で定める.フロイドの循環検出法より,もし
	//		gcd(x[i] - y[i], n) = g ∈ [2..n-1]
	// であれば,これは f が Z/gZ(g は n の真の約数)で巡回したことを意味する.
	//
	// 実際には,
	//		x は r = (2 冪) 個ずつ進める(定数 1/2 倍)
	//		gcd の計算を m = n^(1/8) 程度個まとめて行う(gcd の log を落とす)
	// ことにより高速化を図る.

	if (!(n & 1)) return 2;

	int m = 1 << (msb(n) / 8);
	mll::set_mod(n); // n は合成数だが割り算は使わないので問題ない

	const int c_max = 99; // c を最大どこまで試すか
	repi(c, 1, c_max) {
		auto f = [&](mll x) { return x * x + c; };

		mll x, y = 2, y_bak;
		T g = 1;
		int r = 1;

		// g = 1 である間は巡回未検出
		while (g == 1) {
			// x, y を r = 2^i だけ一気に進める.
			x = y;
			rep(hoge, r) y = f(y);

			// 次の r = 2^i 個をまとめて見る.
			for (int k = 0; k < r; k += m) {
				// 一気に掛けすぎて g = n となってしまった場合の復元用
				y_bak = y;

				// m 個ごとにまとめて見る.
				mll mul = 1;
				rep(i, min(m, r - k)) {
					y = f(y);

					// 複数個掛けておき,後でまとめて gcd を計算する.
					//(フロイドの循環検出法とは違い x を固定しているが,
					// 巡回は検出できるので問題ない.)
					mul *= x - y;
				}
				g = (T)gcd(mul.val(), (ll)n);

				// g != 1 なら巡回を検出できたので次の処理へ
				if (g != 1) goto LOOP_END;
			}

			r *= 2;
		}

	LOOP_END:;
		// 一気に掛けすぎて g = n となってしまった(であろう)場合
		if (g == n) {
			// 復元用に残しておいた x, y_bak から再スタート
			g = 1;
			while (g == 1) {
				y_bak = f(y_bak);
				g = (T)gcd((x - y_bak).val(), (ll)n);
			}
		}

		// g < n なら g が n の真の約数なのでそれを返す.
		if (g < n) return g;

		// 本当に g = n ならたまたま真の約数が全て同時検出されてしまったので,
		// 関数 f における定数項 c の値を別のものに取り替えて再挑戦.
	}

	// 複数個の c を試してなお失敗したなら諦める.
	return n;
}


//【素因数分解】O(n^(1/4))
/*
* n を素因数分解した結果を pps に格納し pps を返す.
* pps[p] = d : n に素因数 p が d 個含まれていることを表す.
*
* 利用:【素数判定】,【約数検出】
*/
template <class T = ll>
map<T, int> factor_integer(T n) {
	// verify : https://judge.yosupo.jp/problem/factorize

	map<T, int> pps;
	if (n == 1) return map<T, int>();

	// 検出した約数を記録しておくキュー
	queue<T> divs;
	divs.push(n);

	while (!divs.empty()) {
		T d = divs.front();
		divs.pop();

		// 約数が素数なら素因数発見
		if (miller_rabin(d)) {
			pps[d]++;
		}
		// 約数が合成数なら新たな約数を 2 つ発見する
		else {
			T d1 = pollard_rho<T>(d);
			T d2 = d / d1;
			divs.push(d1);
			divs.push(d2);
		}
	}

	return pps;
}


//【原始根】O(p^(1/4))
/*
* 素数の法 p における原始根を何か 1 つ返す.
*
* 利用:【素因数分解】
*/
ll find_primitive_root(ll p) {
	// verify : https://judge.yosupo.jp/problem/primitive_root

	if (p == 2) return 1LL;

	mt19937_64 mt((int)time(NULL));
	uniform_int_distribution<ll> rnd(1, p - 1);

	// p-1 の素因数を得る.
	auto pps = factor_integer(p - 1);
	mll::set_mod(p);

	while (true) {
		// r : 原始根の候補をランダムに選ぶ
		ll r = rnd(mt);

		// p-1 の任意の素因数 q について r^((p-1)/q) が 1 でないことが
		// r が原始根であるための必要十分条件となる.
		bool ok = true;
		for (auto [q, e] : pps) {
			if (mll(r).pow((p - 1) / q) == 1) {
				ok = false;
				break;
			}
		}

		if (ok) return r;
	}
	return -1LL;
}


//【切り上げ(余り指定)】O(1)
/*
* x 以上の整数で mod m で k に等しい最小のものを返す.
*/
template <class T>
T ceil_mod(T x, T m, T k) {
	// verify: https://atcoder.jp/contests/abc334/tasks/abc334_b
	Assert(m > 0);
	return x + smod(k - x, m);
}


int main() {
//	input_from_file("input.txt");
//	output_to_file("output.txt");

	int n, x, y;
	cin >> n >> x >> y;

	string s, t;
	cin >> s >> t;

	// mod = p = k 4 x y + 1
	ll p = -1;
	for (ll v = ceil_mod((ll)1e9, 4LL * x * y, 1LL); ; v += 4LL * x * y) {
		if (miller_rabin(v)) {
			p = v;
			break;
		}
	}

	mll r = find_primitive_root(p);

	mll::set_mod(p);

	mll zA = r.pow((p - 1) / (2 * x));
	mll zB = r.pow((p - 1) / (2 * y));
	mll I = r.pow((p - 1) / 4);

	mll cosA = (zA + zA.inv()) / mll(2);
	mll sinA = (zA - zA.inv()) / (2 * I);
	mll cosB = (zB + zB.inv()) / mll(2);
	mll sinB = (zB - zB.inv()) / (2 * I);

	mt19937_64 mt((int)time(NULL));
	uniform_int_distribution<ll> rnd(2, p - 2);

	Fixed_matrix<mll, 3> PA(1), PB(1), iPA(1), iPB(1);
	PA[0][1] = 1;
	PB[1][2] = 1;
	iPA[0][1] = -1;
	iPB[1][2] = -1;

	Fixed_matrix<mll, 3> DA, DB;
	DA[0][0] = cosA;
	DA[0][1] = -sinA;
	DA[1][0] = sinA;
	DA[1][1] = cosA;
	DA[2][2] = rnd(mt);

	DB[0][0] = rnd(mt);
	DB[1][1] = cosB;
	DB[1][2] = sinB;
	DB[2][1] = -sinB;
	DB[2][2] = cosB;

	Fixed_matrix<mll, 3> matA = PA * DA * iPA;
	Fixed_matrix<mll, 3> matB = PB * DB * iPB;

	Fixed_matrix<mll, 3> resS(1), resT(1);
	repe(c, s) resS *= (c == '0' ? matA : matB);
	repe(c, t) resT *= (c == '0' ? matA : matB);

	Yes(resS == resT);
}

提出情報

提出日時
問題 E - Swap 0^X and 1^Y
ユーザ ecottea
言語 C++23 (GCC 15.2.0)
得点 900
コード長 19921 Byte
結果 AC
実行時間 172 ms
メモリ 4980 KiB

ジャッジ結果

セット名 Sample All after_contest
得点 / 配点 0 / 0 900 / 900 0 / 0
結果
AC × 2
AC × 123
AC × 1
セット名 テストケース
Sample example0.txt, example1.txt
All example0.txt, example1.txt, 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, 027.txt, 028.txt, 029.txt, 030.txt, 031.txt, 032.txt, 033.txt, 034.txt, 035.txt, 036.txt, 037.txt, 038.txt, 039.txt, 040.txt, 041.txt, 042.txt, 043.txt, 044.txt, 045.txt, 046.txt, 047.txt, 048.txt, 049.txt, 050.txt, 051.txt, 052.txt, 053.txt, 054.txt, 055.txt, 056.txt, 057.txt, 058.txt, 059.txt, 060.txt, 061.txt, 062.txt, 063.txt, 064.txt, 065.txt, 066.txt, 067.txt, 068.txt, 069.txt, 070.txt, 071.txt, 072.txt, 073.txt, 074.txt, 075.txt, 076.txt, 077.txt, 078.txt, 079.txt, 080.txt, 081.txt, 082.txt, 083.txt, 084.txt, 085.txt, 086.txt, 087.txt, 088.txt, 089.txt, 090.txt, 091.txt, 092.txt, 093.txt, 094.txt, 095.txt, 096.txt, 097.txt, 098.txt, 099.txt, 100.txt, 101.txt, 102.txt, 103.txt, 104.txt, 105.txt, 106.txt, 107.txt, 108.txt, 109.txt, 110.txt, 111.txt, 112.txt, 113.txt, 114.txt, 115.txt, 116.txt, 117.txt, 118.txt, 119.txt, 120.txt
after_contest after_contest_0.txt
ケース名 結果 実行時間 メモリ
000.txt AC 3 ms 3588 KiB
001.txt AC 1 ms 3784 KiB
002.txt AC 127 ms 4552 KiB
003.txt AC 128 ms 4688 KiB
004.txt AC 156 ms 4448 KiB
005.txt AC 154 ms 4640 KiB
006.txt AC 172 ms 4500 KiB
007.txt AC 157 ms 4532 KiB
008.txt AC 156 ms 4456 KiB
009.txt AC 151 ms 4644 KiB
010.txt AC 154 ms 4436 KiB
011.txt AC 1 ms 3732 KiB
012.txt AC 1 ms 3664 KiB
013.txt AC 1 ms 3732 KiB
014.txt AC 127 ms 4672 KiB
015.txt AC 131 ms 4432 KiB
016.txt AC 128 ms 4640 KiB
017.txt AC 128 ms 4496 KiB
018.txt AC 127 ms 4520 KiB
019.txt AC 129 ms 4548 KiB
020.txt AC 139 ms 4600 KiB
021.txt AC 144 ms 4400 KiB
022.txt AC 139 ms 4432 KiB
023.txt AC 146 ms 4556 KiB
024.txt AC 139 ms 4532 KiB
025.txt AC 143 ms 4604 KiB
026.txt AC 129 ms 4636 KiB
027.txt AC 133 ms 4496 KiB
028.txt AC 132 ms 4544 KiB
029.txt AC 129 ms 4432 KiB
030.txt AC 155 ms 4528 KiB
031.txt AC 146 ms 4532 KiB
032.txt AC 138 ms 4552 KiB
033.txt AC 135 ms 4448 KiB
034.txt AC 143 ms 4528 KiB
035.txt AC 145 ms 4504 KiB
036.txt AC 127 ms 4556 KiB
037.txt AC 134 ms 4532 KiB
038.txt AC 160 ms 4528 KiB
039.txt AC 164 ms 4632 KiB
040.txt AC 145 ms 4676 KiB
041.txt AC 151 ms 4580 KiB
042.txt AC 141 ms 4552 KiB
043.txt AC 170 ms 4632 KiB
044.txt AC 154 ms 4632 KiB
045.txt AC 149 ms 4456 KiB
046.txt AC 166 ms 4496 KiB
047.txt AC 152 ms 4448 KiB
048.txt AC 127 ms 4588 KiB
049.txt AC 156 ms 4628 KiB
050.txt AC 144 ms 4576 KiB
051.txt AC 148 ms 4592 KiB
052.txt AC 137 ms 4476 KiB
053.txt AC 135 ms 4532 KiB
054.txt AC 146 ms 4540 KiB
055.txt AC 166 ms 4480 KiB
056.txt AC 130 ms 4500 KiB
057.txt AC 152 ms 4548 KiB
058.txt AC 165 ms 4620 KiB
059.txt AC 163 ms 4636 KiB
060.txt AC 157 ms 4592 KiB
061.txt AC 150 ms 4592 KiB
062.txt AC 152 ms 4608 KiB
063.txt AC 168 ms 4640 KiB
064.txt AC 130 ms 4852 KiB
065.txt AC 150 ms 4932 KiB
066.txt AC 135 ms 4676 KiB
067.txt AC 136 ms 4796 KiB
068.txt AC 152 ms 4980 KiB
069.txt AC 156 ms 4788 KiB
070.txt AC 142 ms 4692 KiB
071.txt AC 163 ms 4892 KiB
072.txt AC 154 ms 4808 KiB
073.txt AC 149 ms 4928 KiB
074.txt AC 165 ms 4760 KiB
075.txt AC 166 ms 4624 KiB
076.txt AC 155 ms 4748 KiB
077.txt AC 154 ms 4724 KiB
078.txt AC 168 ms 4552 KiB
079.txt AC 166 ms 4640 KiB
080.txt AC 7 ms 3776 KiB
081.txt AC 94 ms 4268 KiB
082.txt AC 115 ms 4680 KiB
083.txt AC 171 ms 4552 KiB
084.txt AC 171 ms 4676 KiB
085.txt AC 171 ms 4592 KiB
086.txt AC 155 ms 4628 KiB
087.txt AC 160 ms 4480 KiB
088.txt AC 149 ms 4528 KiB
089.txt AC 169 ms 4504 KiB
090.txt AC 88 ms 4180 KiB
091.txt AC 161 ms 4740 KiB
092.txt AC 107 ms 4392 KiB
093.txt AC 83 ms 4184 KiB
094.txt AC 127 ms 4548 KiB
095.txt AC 56 ms 4000 KiB
096.txt AC 153 ms 4712 KiB
097.txt AC 166 ms 4792 KiB
098.txt AC 129 ms 4864 KiB
099.txt AC 150 ms 4796 KiB
100.txt AC 141 ms 4420 KiB
101.txt AC 157 ms 4836 KiB
102.txt AC 150 ms 4628 KiB
103.txt AC 70 ms 4180 KiB
104.txt AC 119 ms 4756 KiB
105.txt AC 138 ms 4916 KiB
106.txt AC 146 ms 4796 KiB
107.txt AC 139 ms 4420 KiB
108.txt AC 105 ms 4528 KiB
109.txt AC 156 ms 4884 KiB
110.txt AC 116 ms 4424 KiB
111.txt AC 155 ms 4748 KiB
112.txt AC 141 ms 4504 KiB
113.txt AC 142 ms 4640 KiB
114.txt AC 147 ms 4428 KiB
115.txt AC 147 ms 4500 KiB
116.txt AC 160 ms 4448 KiB
117.txt AC 149 ms 4540 KiB
118.txt AC 140 ms 4576 KiB
119.txt AC 158 ms 4552 KiB
120.txt AC 163 ms 4552 KiB
after_contest_0.txt AC 1 ms 3752 KiB
example0.txt AC 1 ms 3752 KiB
example1.txt AC 1 ms 3652 KiB