# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1071629 |
2024-08-23T09:28:03 Z |
vjudge1 |
Addk (eJOI21_addk) |
C++17 |
|
2000 ms |
604 KB |
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define nn "\n";
#define pb push_back
const int N = 1e5 + 8 , inf = 1e17 ;
int n , k , a[N] ,q ;
signed main() {
ios_base::sync_with_stdio(0), cin.tie(0);
cin>> n >> k ;
for(int i= 1 ; i <= n ; i++){
cin>> a[i];
}
cin>> q ;
while(q--){
int h , l , r , m ;
cin>> h ;
if(h == 1 ){
int x ;
cin>> x ;
}
else {
cin >> l >> r >> m;
int ans =0 ;
int go = l ;
while(go+m - 1 <= r){
for(int i = go ; i <= go+m-1; i++)ans+=a[i];
go++;
}
cout << ans << nn
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
38 ms |
344 KB |
Output is correct |
3 |
Correct |
289 ms |
480 KB |
Output is correct |
4 |
Correct |
1049 ms |
344 KB |
Output is correct |
5 |
Execution timed out |
2029 ms |
348 KB |
Time limit exceeded |
6 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2044 ms |
604 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2065 ms |
600 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |