Submission #572377

# Submission time Handle Problem Language Result Execution time Memory
572377 2022-06-04T09:59:46 Z MODDI Pilot (NOI19_pilot) C++14
55 / 100
1000 ms 2948 KB
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vl vector<ll>
#define mp make_pair
#define pb push_back
using namespace std;
int n, q;
vl arr;
int main(){
	cin>>n>>q;
	arr.resize(n);
	for(int i = 0; i < n; i++){
		cin>>arr[i];
	}
	vl queries;
	for(int i = 0; i < q; i++){
		ll a;
		cin>>a;
		queries.pb(a);
	}
	for(int i = 0; i < q; i++){
		ll h = queries[i];
		ll rez = 0, track = 0;
		for(int i = 0; i < n; i++){
			if(arr[i] > h)
				track = 0;
			else{
				track++;
				rez += track;
			}
		}
		cout<<rez<<endl;
	}
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 296 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 296 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 296 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 304 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 300 KB Output is correct
20 Correct 2 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 296 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 304 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 300 KB Output is correct
20 Correct 2 ms 212 KB Output is correct
21 Correct 4 ms 212 KB Output is correct
22 Correct 5 ms 340 KB Output is correct
23 Correct 6 ms 212 KB Output is correct
24 Correct 5 ms 336 KB Output is correct
25 Correct 5 ms 332 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 37 ms 1432 KB Output is correct
2 Correct 46 ms 1700 KB Output is correct
3 Correct 24 ms 1472 KB Output is correct
4 Correct 27 ms 1608 KB Output is correct
5 Correct 38 ms 1536 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 1073 ms 2848 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1043 ms 2948 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 296 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 37 ms 1432 KB Output is correct
12 Correct 46 ms 1700 KB Output is correct
13 Correct 24 ms 1472 KB Output is correct
14 Correct 27 ms 1608 KB Output is correct
15 Correct 38 ms 1536 KB Output is correct
16 Correct 32 ms 1648 KB Output is correct
17 Correct 30 ms 1704 KB Output is correct
18 Correct 33 ms 1740 KB Output is correct
19 Correct 33 ms 1516 KB Output is correct
20 Correct 34 ms 1688 KB Output is correct
21 Correct 24 ms 1520 KB Output is correct
22 Correct 30 ms 1528 KB Output is correct
23 Correct 35 ms 1640 KB Output is correct
24 Correct 38 ms 1520 KB Output is correct
25 Correct 36 ms 1556 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 296 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 304 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 300 KB Output is correct
20 Correct 2 ms 212 KB Output is correct
21 Correct 4 ms 212 KB Output is correct
22 Correct 5 ms 340 KB Output is correct
23 Correct 6 ms 212 KB Output is correct
24 Correct 5 ms 336 KB Output is correct
25 Correct 5 ms 332 KB Output is correct
26 Correct 37 ms 1432 KB Output is correct
27 Correct 46 ms 1700 KB Output is correct
28 Correct 24 ms 1472 KB Output is correct
29 Correct 27 ms 1608 KB Output is correct
30 Correct 38 ms 1536 KB Output is correct
31 Execution timed out 1073 ms 2848 KB Time limit exceeded
32 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 296 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 304 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 300 KB Output is correct
20 Correct 2 ms 212 KB Output is correct
21 Correct 4 ms 212 KB Output is correct
22 Correct 5 ms 340 KB Output is correct
23 Correct 6 ms 212 KB Output is correct
24 Correct 5 ms 336 KB Output is correct
25 Correct 5 ms 332 KB Output is correct
26 Correct 37 ms 1432 KB Output is correct
27 Correct 46 ms 1700 KB Output is correct
28 Correct 24 ms 1472 KB Output is correct
29 Correct 27 ms 1608 KB Output is correct
30 Correct 38 ms 1536 KB Output is correct
31 Execution timed out 1073 ms 2848 KB Time limit exceeded
32 Halted 0 ms 0 KB -