Submission #715030

#TimeUsernameProblemLanguageResultExecution timeMemory
715030keystoneKamenčići (COCI21_kamencici)C++14
0 / 70
0 ms212 KiB
#include <iostream> #include <string> using namespace std; int main() { int n, k; string s; cin >> n >> k >> s; int cnt = 0; // count of consecutive red pebbles for (int i = 0; i < n; i++) { if (s[i] == 'C') { cnt++; if (cnt >= k) { cout << "DA" << endl; return 0; } } else { cnt = 0; } } cout << "NE" << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...