結果

問題 No.2314 Backflip
ユーザー ParacanthurusParacanthurus
提出日時 2023-05-28 02:48:05
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 3,356 bytes
コンパイル時間 3,835 ms
コンパイル使用メモリ 227,768 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-27 02:43:47
合計ジャッジ時間 4,718 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#include<atcoder/all>

#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define REP(i, n) for (ll i = 0; i < n; i++)
#define REPR(i, n) for (ll i = n; i >= 0; i--)
#define FOREACH(x, a) for (auto&& x : a)
#define CIN(...) ll __VA_ARGS__; CINT(__VA_ARGS__)
#define DCIN(...) ld __VA_ARGS__; CINT(__VA_ARGS__)
#define SCIN(...) string __VA_ARGS__; CINT(__VA_ARGS__)
#define VCIN(x) FOREACH(_e, x) std::cin >> _e
#define VVCIN(x) FOREACH(_v, x) FOREACH(_e, _v) std::cin >> _e
#define GCIN(g, n) REP(_i, n) {CIN(_a, _b); g[_a - 1].push_back(_b - 1); g[_b - 1].push_back(_a - 1);}
#define DGCIN(g, n) REP(_i, n) {CIN(_a, _b); g[_a - 1].push_back(_b - 1);}
#define WGCIN(g, n) REP(_i, n) {CIN(_a, _b, _w); g[_a - 1].push_back(Edge(_b - 1, _w, _i)); g[_b - 1].push_back(Edge(_a - 1, _w, _i));}
#define WDGCIN(g, n) REP(_i, n) {CIN(_a, _b, _w); g[_a - 1].push_back(Edge(_b - 1, _w, _i));}
#define COUT(x) std::cout << (x) << "\n"
#define SCOUT(x) std::cout << (x) << " "
#define VCOUT(x) FOREACH(_e, x) std::cout << _e << "\n"
#define SVCOUT(x) FOREACH(_e, x) std::cout << _e << " "; std::cout << std::endl
#define VVCOUT(x) FOREACH(_v, x) {SVCOUT(_v);}
#define Yes(n) std::cout << ((n) ? "Yes" : "No") << "\n"
#define ALL(x) x.begin(), x.end()
#define RALL(x) x.rbegin(), x.rend()
#define DUMP(x) std::cout << (#x) << " = " << x << std::endl
#define SVDUMP(x) std::cout << #x << " = "; SVCOUT(x);
#define VDUMP(x) REP(_i, x.size()) std::cout << #x << "[" << _i << "] = " << x[_i] << std::endl
#define VVDUMP(x) REP(_i, x.size()) {std::cout << #x << "[" << _i << "] = "; SVCOUT(x[_i]);}
#define BIT(x, n) (((x) >> (n)) & 1)
#define REAL(x, p) vector<ld> x(p.size()); REP(i, p.size()) x[i] = p[i].real()
#define IMAG(x, p) vector<ld> x(p.size()); REP(i, p.size()) x[i] = p[i].imag()

using namespace std;
using namespace atcoder;

struct Edge{
	long long to;
	long long w;
	long long no;
	Edge(long long to, long long w, long long no = -1) : to(to), w(w), no(no) {}
};

using ll = long long;
using ull = unsigned long long;
using ld = long double;
using str = string;
template<class T> using cp = complex<T>;
using Graph = vector<vector<ll>>;
using WGraph = vector<vector<Edge>>;
template<class T> using max_heap = priority_queue<T>;
template<class T> using min_heap = priority_queue<T, vector<T>, greater<T>>;
using UnionFind = dsu;

const int INF = 1 << 30;
const ll INFL = 1LL << 60;

template<class T> inline bool chmax(T& a, T b) {if (a < b) { a = b; return (true);} return (false);}
template<class T> inline bool chmin(T& a, T b) {if (a > b) { a = b; return (true);} return (false);}
inline ll ceil(ll a, ll b) {return (a / b + (a % b != 0));}
inline ll floor(ll a, ll b) {return (a / b);}

ll dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
ll dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

struct InitCppIo{
	InitCppIo() noexcept{
		std::cin.tie(nullptr);
		std::ios::sync_with_stdio(false);
		std::cout << std::fixed << std::setprecision(15);
	}
} initCppIo;

void CINT(){}
template <class Head, class... Tail>
void CINT(Head&& head, Tail&&... tail){
	std::cin >> head;
	CINT(move(tail)...);
}
/*-----------------------------------------------------------------------------------------------------------------------------------*/



int main()
{
	SCIN(S);
	if (S[S.size() - 1] == '0')
		S[S.size() - 1] = '1';
	else
		S[S.size() - 1] = '0';
	COUT(S);
}
0