aboutsummaryrefslogtreecommitdiff
path: root/codechef/icpcBallons.cpp
diff options
context:
space:
mode:
authorOmar Magdy <omar.professional8777@gmail.com>2022-05-29 23:29:33 +0200
committerOmar Magdy <omar.professional8777@gmail.com>2022-05-29 23:29:33 +0200
commitf5ff62a26052f084b6b807cba220c86785fd45e3 (patch)
tree94092ede47f7c36cc18112f48ff861bd6e8e903a /codechef/icpcBallons.cpp
parente680d1628e20c0222a83e73695fc0a8857571c63 (diff)
downloadcompetitive-programming-f5ff62a26052f084b6b807cba220c86785fd45e3.tar.xz
competitive-programming-f5ff62a26052f084b6b807cba220c86785fd45e3.zip
Solved 2 problem and edited .gitignore
Diffstat (limited to 'codechef/icpcBallons.cpp')
-rw-r--r--codechef/icpcBallons.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/codechef/icpcBallons.cpp b/codechef/icpcBallons.cpp
new file mode 100644
index 0000000..0a66c77
--- /dev/null
+++ b/codechef/icpcBallons.cpp
@@ -0,0 +1,23 @@
+#include<bits/stdc++.h>
+
+using namespace std;
+
+int main () {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int tt;
+ cin >> tt;
+ while(tt--){
+ int n;
+ cin >> n;
+ vector<int> v(n);
+ int ans = 0;
+ for(int &x : v) cin >> x;
+ for(int i = 0; i < v.size(); i++) {
+ if(v[i] <= 7) {
+ ans = i + 1;
+ }
+ }
+ cout << ans << '\n';
+ }
+}