We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8643b76 commit ba35c8bCopy full SHA for ba35c8b
1810A - Beautiful Sequence.cpp
@@ -0,0 +1,38 @@
1
+// ॐ नमः शिवाय
2
+#include<bits/stdc++.h>
3
+using namespace std;
4
+#define pb push_back
5
+#define ll long long
6
+
7
+// Code Written By: Vikash Patel
8
+// Codeforces Profile: https://codeforces.com/profile/vikashpatel
9
10
+int main()
11
+{
12
+ int t;
13
+ cin>>t;
14
+ while(t--)
15
+ {
16
+ int n;
17
+ cin>>n;
18
+ int a[n];
19
+ for(int i=0; i<n; i++)
20
21
+ cin>>a[i];
22
+ }
23
+ bool beautiful = false;
24
25
26
+ if((i+1)>=a[i])
27
28
+ beautiful = true;
29
+ break;
30
31
32
+ if(beautiful)
33
+ cout<<"YES"<<endl;
34
+ else
35
+ cout<<"NO"<<endl;
36
37
+ return 0;
38
+}
0 commit comments