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/4] 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/4] [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; +} + + From de257ba41e7a149ef4f76467b93eb76cc586e3af 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:09:29 +0900 Subject: [PATCH 3/4] [CREATE] theo_sogang_B --- .../theo_sogang_B.cpp" | 22 +++++++++++++++++++ 1 file changed, 22 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/(B) \354\262\255\354\240\225\354\210\230\354\227\264 (Easy)/theo_sogang_B.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/(B) \354\262\255\354\240\225\354\210\230\354\227\264 (Easy)/theo_sogang_B.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/(B) \354\262\255\354\240\225\354\210\230\354\227\264 (Easy)/theo_sogang_B.cpp" new file mode 100644 index 0000000..332568c --- /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/(B) \354\262\255\354\240\225\354\210\230\354\227\264 (Easy)/theo_sogang_B.cpp" @@ -0,0 +1,22 @@ +#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 main() { + int res = 1; + int n; cin >> n; + for (int i = 1; i <= n; i++) { + res *= i; + } + cout << res; +} + + From 9da3cb2a624a779bd940ed41a9ff5944b44446b1 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:11:42 +0900 Subject: [PATCH 4/4] [CREATE]theo_sogang_C --- .../theo_sogang_C.cpp" | 29 +++++++++++++++++++ 1 file changed, 29 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/(C) \354\204\234\352\260\225\354\235\230 \354\227\255\354\202\254\353\245\274 \354\260\276\354\225\204\354\204\234/theo_sogang_C.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/(C) \354\204\234\352\260\225\354\235\230 \354\227\255\354\202\254\353\245\274 \354\260\276\354\225\204\354\204\234/theo_sogang_C.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/(C) \354\204\234\352\260\225\354\235\230 \354\227\255\354\202\254\353\245\274 \354\260\276\354\225\204\354\204\234/theo_sogang_C.cpp" new file mode 100644 index 0000000..2b64be8 --- /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/(C) \354\204\234\352\260\225\354\235\230 \354\227\255\354\202\254\353\245\274 \354\260\276\354\225\204\354\204\234/theo_sogang_C.cpp" @@ -0,0 +1,29 @@ +#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 main() { + int n, m; cin >> n >> m; + int a[1001] = {}, b[1001] = {}; + for (int i = 0; i < n; i++) { + cin >> a[i]; + } + for (int i = 0; i < m; i++) { + cin >> b[i]; + } + int mx = -1e9; + for (int i = 0; i < max(n, m); i++) { + mx = max(b[i] - a[i], mx); + } + cout << (mx < 0 ? 0 : mx); +} + +