diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..0702d4e Binary files /dev/null and b/.DS_Store differ diff --git a/.vscode/settings.json b/.vscode/settings.json index 1dcc716..3af6c9f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,85 @@ "vector": "cpp", "ostream": "cpp", "functional": "cpp", - "string": "cpp" + "string": "cpp", + "__bit_reference": "cpp", + "__bits": "cpp", + "__config": "cpp", + "__debug": "cpp", + "__errc": "cpp", + "__hash_table": "cpp", + "__locale": "cpp", + "__mutex_base": "cpp", + "__node_handle": "cpp", + "__nullptr": "cpp", + "__split_buffer": "cpp", + "__string": "cpp", + "__threading_support": "cpp", + "__tree": "cpp", + "__tuple": "cpp", + "array": "cpp", + "atomic": "cpp", + "bitset": "cpp", + "cctype": "cpp", + "cfenv": "cpp", + "chrono": "cpp", + "cinttypes": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "compare": "cpp", + "complex": "cpp", + "concepts": "cpp", + "condition_variable": "cpp", + "csetjmp": "cpp", + "csignal": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "exception": "cpp", + "forward_list": "cpp", + "fstream": "cpp", + "future": "cpp", + "initializer_list": "cpp", + "iomanip": "cpp", + "ios": "cpp", + "iosfwd": "cpp", + "istream": "cpp", + "limits": "cpp", + "list": "cpp", + "locale": "cpp", + "map": "cpp", + "memory": "cpp", + "mutex": "cpp", + "new": "cpp", + "numeric": "cpp", + "optional": "cpp", + "queue": "cpp", + "random": "cpp", + "ratio": "cpp", + "regex": "cpp", + "set": "cpp", + "sstream": "cpp", + "stack": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "thread": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "typeindex": "cpp", + "typeinfo": "cpp", + "unordered_map": "cpp", + "unordered_set": "cpp", + "valarray": "cpp", + "variant": "cpp", + "algorithm": "cpp" } } \ No newline at end of file diff --git a/abc278/a/a b/abc278/a/a new file mode 100755 index 0000000..139f03c Binary files /dev/null and b/abc278/a/a differ diff --git a/abc278/a/a.cpp b/abc278/a/a.cpp new file mode 100644 index 0000000..8e36070 --- /dev/null +++ b/abc278/a/a.cpp @@ -0,0 +1,29 @@ +#include +#include +using namespace std; + +int main(){ + int N, K; + cin >> N >> K; + + int A[100]; + + for (int i = 1; i <= N; i++) + { + cin >> A[i]; + } + + for (int j = 1; j <= K; j++) + { + for (int k = 1; k <= N - 1; k++) + { + A[k] = A[k + 1]; + } + A[N] = 0; + } + + for (int i = 1; i <= N; i++) + { + cout << A[i] << endl;; + } +} \ No newline at end of file diff --git a/abc278/b/b b/abc278/b/b new file mode 100755 index 0000000..52307d7 Binary files /dev/null and b/abc278/b/b differ diff --git a/abc278/b/b.cpp b/abc278/b/b.cpp new file mode 100644 index 0000000..7d7bda9 --- /dev/null +++ b/abc278/b/b.cpp @@ -0,0 +1,48 @@ +#include +#include +using namespace std; + +int main(){ + int H, M; + + do + { + cin >> H >> M; + } while (H >= 24 || M >= 60); + + int Time[4]; + int newH, newM; + + do + { + if (H < 10) + { + Time[0] = 0; + Time[1] = H; + } else { + Time[0] = H / 10; + Time[1] = H % 10; + } + + Time[2] = M / 10; + Time[3] = M % 10; + + newH = Time[0] * 10 + Time[2]; + newM = Time[1] * 10 + Time[3]; + + M++; + if (M == 60) + { + H++; + M = 0; + } + if (H == 24) + { + H = 0; + } + } while (newH >= 24 || newM >= 60); + + cout << H << ' ' << M - 1 << endl; + + return 0; +} \ No newline at end of file diff --git a/abc278/c/c b/abc278/c/c new file mode 100755 index 0000000..a42c410 Binary files /dev/null and b/abc278/c/c differ diff --git a/abc278/c/c.cpp b/abc278/c/c.cpp new file mode 100644 index 0000000..27111ab --- /dev/null +++ b/abc278/c/c.cpp @@ -0,0 +1,48 @@ +#include +using namespace std; + +int main(){ + int N, Q; + + do + { + cin >> N >> Q; + } while ( + N <= 2 && + N >= pow(10, 9.0) && + Q <= 1 && + Q >= 2 * pow(10, 5.0) + ); + + set > user; + user.insert({3, 2}); + + for (int i = 0; i < Q; i++) + { + int T, A, B; + cin >> T >> A >> B; + + switch (T) + { + case 1: + user.insert({ A, B }); + break; + case 2: + user.erase({ A, B }); + break; + case 3: + if (user.count({ A, B }) && user.count({ B, A })) + { + cout << "Yes" << endl; + } else + { + cout << "No" << endl; + } + break; + default: + break; + } + }; + + return 0; +} \ No newline at end of file