-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcdforcesOCtq3.cpp
More file actions
43 lines (35 loc) · 847 Bytes
/
Copy pathcdforcesOCtq3.cpp
File metadata and controls
43 lines (35 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <bits/stdc++.h>
using namespace std;
int main()
{
int samples;
cin >> samples;
while (samples--)
{
int n;
cin>>n;
int arr[n];
string cover,coverf;
cin>>cover;
for (int i = 0; i < n; i++)
{
cin>>arr[i];
}
coverf=cover;
for (int i = 1; i < n-1; i++)
{
if (cover[i]=='0')
{
if ((cover[i-1]=='1'&&cover[i+1]=='0')||(cover[i-1]=='0'&&cover[i+1]=='1'))
{
}
if (cover[i-1]=='1'&&cover[i+1]=='1')
{
if(arr[i]>arr[i-1]){
}
}
}
}
}
return 0;
}