From 19b78afb33901bf10032f09689813f06cff1d006 Mon Sep 17 00:00:00 2001 From: dooli1971039 Date: Sun, 20 Nov 2022 05:33:10 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=84=B1=EA=B3=B5]=201116=5F=EC=B4=88?= =?UTF-8?q?=EC=A4=91=EA=B8=89=5F=EC=9D=B4=EC=A7=84=EA=B2=BD(=EC=98=A8?= =?UTF-8?q?=EB=9D=BC=EC=9D=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1971039_2246.cpp" | 40 +++++++++++++++++++ .../1971039_4436.cpp" | 28 +++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 "11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/1971039_2246.cpp" create mode 100644 "11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/1971039_4436.cpp" diff --git "a/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/1971039_2246.cpp" "b/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/1971039_2246.cpp" new file mode 100644 index 0000000..d253160 --- /dev/null +++ "b/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/1971039_2246.cpp" @@ -0,0 +1,40 @@ +#include +#include +#include + +using namespace std; + +int main() { + int n; + cin >> n; + + vector> condo(n); + for (int i = 0; i < n; i++) { + int a, b; + cin >> a >> b; + condo[i] = make_pair(a, b); + } + + // sort(condo.begin(), condo.end()); + + int count = 0; + for (int i = 0; i < n; i++) { //기준 + int check = true; + for (int j = 0; j < n; j++) { + if (j == i) + continue; + + if (condo[j].first < condo[i].first && condo[i].second >= condo[j].second) { + check = false; + break; + } + if (condo[j].second < condo[i].second && condo[j].first <= condo[i].first) { + check = false; + break; + } + } + if (check) + count++; + } + cout << count; +} \ No newline at end of file diff --git "a/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/1971039_4436.cpp" "b/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/1971039_4436.cpp" new file mode 100644 index 0000000..3ec67db --- /dev/null +++ "b/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/1971039_4436.cpp" @@ -0,0 +1,28 @@ +#include +#include +#include +#include + +using namespace std; + +int main() { + while (true) { + long long n; //반드시 long long으로 해야함 (아니면 19번째줄 연산시 형변환 필요) + cin >> n; + if (cin.eof() == true) { + break; + } + + int i = 1; + set s; + while (s.size() < 10) { + long long num = n * i; //반드시 long long으로 해야함 + while (num != 0) { + s.insert(num % 10); + num /= 10; + } + i++; + } + cout << i - 1 << "\n"; + } +} \ No newline at end of file