From a2eaf2838edecf6c551b2cf2b1cb4a2035f53a1b Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 26 Mar 2022 19:03:53 +0800 Subject: [PATCH] =?UTF-8?q?4317.=20=E4=B8=8D=E5=90=8C=E6=AD=A3=E6=95=B4?= =?UTF-8?q?=E6=95=B0=E7=9A=84=E4=B8=AA=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.acwing.com/problem/content/submission/code_detail/12513087/ --- AcWing/4317/4317.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 AcWing/4317/4317.cpp diff --git a/AcWing/4317/4317.cpp b/AcWing/4317/4317.cpp new file mode 100644 index 00000000..4c395e06 --- /dev/null +++ b/AcWing/4317/4317.cpp @@ -0,0 +1,20 @@ +#include +#include + +using std::cin; +using std::cout; +const char endl = '\n'; + +int n; +std::set set; + +int main() { + std::ios::sync_with_stdio(false); + cin >> n; + for (int i = 1, x; i <= n; i++) { + cin >> x; + if (x > 0) set.insert(x); + } + cout << set.size() << endl; + return 0; +}