From 01a66fdef5af524ef6fed359ec909c8b16f4b64e Mon Sep 17 00:00:00 2001 From: YUJI Date: Sat, 23 Apr 2022 22:39:18 +0900 Subject: [PATCH] tired --- a.cpp | 19 ++++++++++++++++++- b.cpp | 35 ++++++++++++++++++++++++++++++++++- c.cpp | 13 ++++++++++++- 3 files changed, 64 insertions(+), 3 deletions(-) diff --git a/a.cpp b/a.cpp index c97653d..97a12a1 100644 --- a/a.cpp +++ b/a.cpp @@ -5,5 +5,22 @@ using namespace atcoder; int main() { - cout << "hello,world" << endl; + int a, b, c, d, e, f, x; + cin >> a >> b >> c >> d >> e >> f >> x; + + int takahashi = b * (a * (x / (a + c)) + min(x % (a + c), a)); + int aoki = e * (d * (x / (d + f)) + min(x % (d + f), d)); + + if (takahashi > aoki) + { + cout << "Takahashi" << endl; + } + else if (takahashi < aoki) + { + cout << "Aoki" << endl; + } + else + { + cout << "Draw" << endl; + } } diff --git a/b.cpp b/b.cpp index c97653d..b6e661f 100644 --- a/b.cpp +++ b/b.cpp @@ -5,5 +5,38 @@ using namespace atcoder; int main() { - cout << "hello,world" << endl; + string s; + map count; + bool is_small_appeared = false; + bool is_large_appeared = false; + + cin >> s; + for (auto c : s) + { + if (count[c]) + { + cout << "No" << endl; + return 0; + } + + if ('a' <= c && c <= 'z') + { + is_small_appeared = true; + } + else + { + is_large_appeared = true; + } + + count[c] = true; + } + + if (!is_small_appeared || !is_large_appeared) + { + cout << "No" << endl; + } + else + { + cout << "Yes" << endl; + } } diff --git a/c.cpp b/c.cpp index c97653d..5142d22 100644 --- a/c.cpp +++ b/c.cpp @@ -5,5 +5,16 @@ using namespace atcoder; int main() { - cout << "hello,world" << endl; + int n, k; + vector s; + + cin >> n >> k; + for (int i = 0; i < n; i++) + { + string tmp; + cin >> tmp; + s.push_back(tmp); + } + + }