# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1174619 | JelalTkm | Street Lamps (APIO19_street_lamps) | C++20 | 96 ms | 8264 KiB |
#include <bits/stdc++.h>
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
using namespace std;
#define int long long int
const int N = 1000 + 10;
const int md = 1e9 + 7;
const int INF = 1e18;
int32_t main(int32_t argc, char *argv[]) {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T = 1;
// cin >> T;
while (T--) {
int n, q;
cin >> n >> q;
string s;
cin >> s;
s = '#' + s;
vector<vector<int>> a(n + 1, vector<int> (n + 1));
while (q--) {
for (int i = 1; i <= n; i++)
for (int j = i; j <= n; j++) {
if (s[j] == '0') break;
else a[i][j]++;
# | 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... |