aboutsummaryrefslogtreecommitdiff
path: root/codechef/chefAndIpcCertificates.cpp
diff options
context:
space:
mode:
authorOmar Magdy <omar.professional8777@gmail.com>2022-05-29 19:37:41 +0200
committerOmar Magdy <omar.professional8777@gmail.com>2022-05-29 19:37:41 +0200
commit72d3a7d06e137c5ab420f8fe131ee50ae585f9f5 (patch)
tree2bebcf7245bd75989aa6a7c0bf784294c86a3c63 /codechef/chefAndIpcCertificates.cpp
parent3d2f75923401460e4c8e8b56e4a24b5a2e065592 (diff)
downloadcompetitive-programming-72d3a7d06e137c5ab420f8fe131ee50ae585f9f5.tar.xz
competitive-programming-72d3a7d06e137c5ab420f8fe131ee50ae585f9f5.zip
Solved two problem in codechef
Diffstat (limited to 'codechef/chefAndIpcCertificates.cpp')
-rw-r--r--codechef/chefAndIpcCertificates.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/codechef/chefAndIpcCertificates.cpp b/codechef/chefAndIpcCertificates.cpp
new file mode 100644
index 0000000..03e93c7
--- /dev/null
+++ b/codechef/chefAndIpcCertificates.cpp
@@ -0,0 +1,22 @@
+#include <bits/stdc++.h>
+
+using namespace std;
+
+int main() {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int n, m, k;
+ cin >> n >> m >> k;
+ int ans = 0;
+ for (int i = 0; i < n; i++) {
+ vector<int> v(k);
+ for (int &x : v)
+ cin >> x;
+ int q;
+ cin >> q;
+ if (accumulate(v.begin(), v.end(), 0) >= m && q <= 10) {
+ ans++;
+ }
+ }
+ cout << ans << '\n';
+}