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; +} + + 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; +} + + 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); +} + + 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