# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
798679 | gg123_pe | Street Lamps (APIO19_street_lamps) | C++14 | 1199 ms | 167660 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define f(i,a,b) for(int i = a; i < b; i++)
const int N = 3e5 + 5, M = 1000;
const int RA = 1e6 + 5;
int n, q;
ll a[M][M];
void subtask_1(){
f(i,1,q+1){
f(j,1,n+1) a[i][j] = a[i-1][j];
string ty;
ll x, y;
cin >> ty;
if(ty[0] == 'q'){
cin >> x >> y;
// cuantos tiempos el rango [x, y-1] suma 0
int ans = 0;
f(j,0,i){
int sum = 0;
f(r,x,y) sum += a[j][r];
if(sum == 0) ans++;
}
cout << ans << "\n";
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |