# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1174627 | JelalTkm | Street Lamps (APIO19_street_lamps) | C++20 | 5100 ms | 589824 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 + 2, vector<int> (n + 2));
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 + 1]++;
# | 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... |