From 7d136219e8c87a12c1596aef76564b936d80a42d Mon Sep 17 00:00:00 2001 From: sari-harin Date: Wed, 23 Aug 2023 15:56:58 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[=20=EC=A0=95=EB=A0=AC,=20=EB=A7=B5,=20?= =?UTF-8?q?=EC=85=8B=20]=208=EC=9B=94=2023=EC=9D=BC=20-ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../19636.cpp" | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 "01_\354\240\225\353\240\254_\353\247\265_\354\205\213/19636.cpp" diff --git "a/01_\354\240\225\353\240\254_\353\247\265_\354\205\213/19636.cpp" "b/01_\354\240\225\353\240\254_\353\247\265_\354\205\213/19636.cpp" new file mode 100644 index 0000000..e50c1a6 --- /dev/null +++ "b/01_\354\240\225\353\240\254_\353\247\265_\354\205\213/19636.cpp" @@ -0,0 +1,46 @@ +#include +#include + +using namespace std; + +int main(){ + int w1, day_eat, diet_eat, diet_ex, n, tr; + + cin >> w1 >> day_eat >> tr; + cin >> n >> diet_eat >> diet_ex; + + int day_life=day_eat; + int diet_life=day_life; + int w0=w1; + int tr_w; + + for(int i=0;itr){ + diet_life+=floor(tr_w/2.0); + } + w0+=diet_eat - day_life - diet_ex; + } + + if(w0<=0){ + cout<<"Danger Diet" << '\n'; + } + else{ + cout << w0 << ' ' << day_life << '\n'; + } + + if(diet_life<=0 || w1<=0){ + cout << "Danger Diet" << '\n'; + } + else{ + if(day_life > diet_life){ + cout << w1 << ' ' << diet_life << ' ' << "YOYO" << '\n'; + } + else{ + cout << w1 << ' ' << diet_life << ' ' << "NO" << '\n'; + } + } + + return 0; +} \ No newline at end of file From 985ec4adcf821e47cd8a608dc7dc8e37b3298a72 Mon Sep 17 00:00:00 2001 From: sari-harin Date: Wed, 23 Aug 2023 17:30:36 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[=20=EC=A0=95=EB=A0=AC,=20=EB=A7=B5,=20?= =?UTF-8?q?=EC=85=8B=20]=208=EC=9B=94=2023=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1431.cpp" | 43 +++++++++++++++++++ .../14425.cpp" | 33 ++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 "01_\354\240\225\353\240\254_\353\247\265_\354\205\213/1431.cpp" create mode 100644 "01_\354\240\225\353\240\254_\353\247\265_\354\205\213/14425.cpp" diff --git "a/01_\354\240\225\353\240\254_\353\247\265_\354\205\213/1431.cpp" "b/01_\354\240\225\353\240\254_\353\247\265_\354\205\213/1431.cpp" new file mode 100644 index 0000000..2acc3f3 --- /dev/null +++ "b/01_\354\240\225\353\240\254_\353\247\265_\354\205\213/1431.cpp" @@ -0,0 +1,43 @@ +#include +#include +#include + +using namespace std; + +bool cmp(const string &s1, const string &s2){ + if(s1.size()!=s2.size()){ + return s1.size()> n; + + vector arr(n); + for(int i=0;i> arr[i]; + } + + sort(arr.begin(), arr.end(), cmp); + + for(int i=0;i +#include +#include + +using namespace std; + +int main(){ + + ios_base::sync_with_stdio(false); + cin.tie(NULL); + + int n, m, num; + string stm; + + cin >> n >> m; + + vector arr(n); + for(int i=0;i> arr[i]; + } + sort(arr.begin(), arr.end()); + + for(int i=0;i> stm; + if(binary_search(arr.begin(), arr.end(), stm)){ + num++; + } + } + + cout << num; + + return 0; +} \ No newline at end of file From 1b37758e9fbf9005e7a45c0da0d3f5b299a5fc7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=ED=95=98=EB=A6=B0?= <124681672+sari-harin@users.noreply.github.com> Date: Wed, 23 Aug 2023 17:31:54 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[=20=EC=A0=95=EB=A0=AC,=20=EB=A7=B5,=20?= =?UTF-8?q?=EC=85=8B=20]=208=EC=9B=94=2023=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../19636.cpp" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/01_\354\240\225\353\240\254_\353\247\265_\354\205\213/19636.cpp" "b/01_\354\240\225\353\240\254_\353\247\265_\354\205\213/19636.cpp" index e50c1a6..14b8e87 100644 --- "a/01_\354\240\225\353\240\254_\353\247\265_\354\205\213/19636.cpp" +++ "b/01_\354\240\225\353\240\254_\353\247\265_\354\205\213/19636.cpp" @@ -43,4 +43,4 @@ int main(){ } return 0; -} \ No newline at end of file +}