From fc86d5ddd7ffb3c3c4b45d36fdaea89eaabbad9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=83=9C=EC=98=A4?= Date: Fri, 27 May 2022 20:07:09 +0900 Subject: [PATCH 1/2] test --- .../(A) Game with Cards/CF129_A.cpp | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Codeforces/(2022.05.23) ECR_129/(A) Game with Cards/CF129_A.cpp diff --git a/Codeforces/(2022.05.23) ECR_129/(A) Game with Cards/CF129_A.cpp b/Codeforces/(2022.05.23) ECR_129/(A) Game with Cards/CF129_A.cpp new file mode 100644 index 0000000..025e39e --- /dev/null +++ b/Codeforces/(2022.05.23) ECR_129/(A) Game with Cards/CF129_A.cpp @@ -0,0 +1,48 @@ +#include +#define all(v) v.begin(),v.end() +#define endl "\n" +#define pii pair +#define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) +#define fs first +#define sc second +#define ll long long +#define np(v) while(next_permutation(v.begin(),v.end())) +using namespace std; + +int n, m, t; +int k; +int tmp = 0; +int main() { + fastio; + vectora; vectorb; + cin >> t; + while (t--) { + a.clear(); b.clear(); + cin >> n; + for (int i = 0; i < n; i++) { + cin >> k; + a.push_back(k); + } + cin >> m; + for (int i = 0; i < m; i++) { + cin >> k; b.push_back(k); + } + sort(all(a)); + sort(all(b)); + if (a[n - 1] >= b[m - 1]) { + cout << "Alice" << endl; + } + else if (a[n - 1] <= b[m - 1]) { + cout << "Bob" << endl; + } + if (a[n - 1] <= b[m - 1]) { + cout << "Bob" << endl; + } + else if (a[n - 1] >= b[m - 1]) { + cout << "Alice" << endl; + } + + + + } +} \ No newline at end of file From 5e759afdb0d65e620129474e8f452dbb84fc09af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=83=9C=EC=98=A4?= Date: Sat, 4 Jun 2022 23:07:08 +0900 Subject: [PATCH 2/2] [CREATE] theo_sogang_A --- .../theo_sogang_A.cpp" | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 "Baekjoon Contest/(2022.06.04) 2022 \354\204\234\352\260\225\353\214\200\355\225\231\352\265\220 \354\262\255\354\240\225\354\210\230\354\273\265-\354\203\210\353\202\264\352\270\260 Round/(A) \353\221\220~~\353\266\200 \353\221\220\353\266\200 \353\221\220\353\266\200/theo_sogang_A.cpp" diff --git "a/Baekjoon Contest/(2022.06.04) 2022 \354\204\234\352\260\225\353\214\200\355\225\231\352\265\220 \354\262\255\354\240\225\354\210\230\354\273\265-\354\203\210\353\202\264\352\270\260 Round/(A) \353\221\220~~\353\266\200 \353\221\220\353\266\200 \353\221\220\353\266\200/theo_sogang_A.cpp" "b/Baekjoon Contest/(2022.06.04) 2022 \354\204\234\352\260\225\353\214\200\355\225\231\352\265\220 \354\262\255\354\240\225\354\210\230\354\273\265-\354\203\210\353\202\264\352\270\260 Round/(A) \353\221\220~~\353\266\200 \353\221\220\353\266\200 \353\221\220\353\266\200/theo_sogang_A.cpp" new file mode 100644 index 0000000..79e518a --- /dev/null +++ "b/Baekjoon Contest/(2022.06.04) 2022 \354\204\234\352\260\225\353\214\200\355\225\231\352\265\220 \354\262\255\354\240\225\354\210\230\354\273\265-\354\203\210\353\202\264\352\270\260 Round/(A) \353\221\220~~\353\266\200 \353\221\220\353\266\200 \353\221\220\353\266\200/theo_sogang_A.cpp" @@ -0,0 +1,26 @@ +#include +#define all(v) v.begin(),v.end() +#define endl "\n" +#define pii pair +#define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) +#define fs first +#define sc second +#define ll long long +#define np(v) while(next_permutation(v.begin(),v.end())) +using namespace std; + +int n, m, k; +int main() { + cin >> n >> m >> k; + k -= 3; m += k; + m %= n; + if (m == 0) { + m = n; + } + if (m < 0) { + m = n + m; + } + cout << m; +} + +