# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
880153 | JoksimKaktus | Lampice (COCI21_lampice) | C++17 | 1 ms | 604 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;
using ll = long long;
void output(bool yes){yes ? cout << "Yes" << "\n" : cout << "No" << "\n";}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(0);
int n,k;
cin >> n >> k;
vector <int> v(n);
for(int i = 0;i < n;i++){
cin >> v[i];
}
for(int i = 1;i <= n/k;i++){
for(int j = 0;j <= n-i*k;j++){
vector <int> res(i);
int l = 0;
while(l < i){
res[l] = v[l+j];
l++;
}
int rest = k-1;
while(rest > 0){
bool good = true;
for(int l2 = 0;l2 < i;l2++){
if(v[l+j+l2] != res[l2]){
good = false;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |