#include <iostream>
#include <queue>
#include <vector>
#include <string>
using namespace std;
struct State {
int pos;
int swim;
};
int main() {
int t;
cin >> t;
while (t--) {
int n, m, k;
cin >> n >> m >> k;
string river;
cin >> river;
vector<bool> visited(n + 2, false);
queue<State> q;
// Starting point at position 0
q.push({0, 0});
visited[0] = true;
bool canReach = false;
while (!canReach && !q.empty()) {
State current = q.front();
q.pop();
int pos = current.pos;
int swim = current.swim;
// Try jumping from the current position
if (pos == 0 || river[pos - 1] == 'L') {
for (int jump = 1; jump <= m; ++jump) {
int newPos = pos + jump;
if (newPos == n + 1) {
canReach = true;
break;
}
if (newPos <= n && river[newPos - 1] != 'C' && !visited[newPos]) {
visited[newPos] = true;
q.push({newPos, swim});
}
}
}
// Try swimming to the next position if currently in water
if (pos > 0 && pos <= n && river[pos - 1] == 'W' && swim < k) {
int newPos = pos + 1;
if (newPos == n + 1) {
canReach = true;
break;
}
if (newPos <= n && river[newPos - 1] != 'C' && !visited[newPos]) {
visited[newPos] = true;
q.push({newPos, swim + 1});
}
}
}
cout << (canReach ? "YES" : "NO") << endl;
}
return 0;
}
almost all D submissions using BFS were copied.
Leaked Solution of E:
E
#include <bits/stdc++.h>
using namespace std;
void run() {
int n; cin >> n;
vector ans(0, pair(0, 0));
string s;
for (int a = 1; a <= 10000; a++) {
s += to_string(n);
for (int b = max(1, int(s.size())-6); b <= min(10000, a100) and b < int(s.size()); b++) {
if (to_string(na-b) == s.substr(0, s.size()-b)) {
ans.emplace_back(a, b);
}
}
}
cout << ans.size() << '\n';
for (auto [a, b] : ans) {
cout << a << ' ' << b << '\n';
}
}
int main() {
cin.tie(0)->sync_with_stdio(0);
int t; cin >> t; while (t--) run();
}
Since there are a lot of cheaters this time, are team is still processing and will update this list accordingly.
I would like to request MikeMirzayanov and the Gornak40 to take actions on the cheaters as well people who are leaking the solutions.
I would also request to take strict action on kyakaregaJanke who leaked the solutions on Youtube and provided the solutions in a drive link and telegram too.
Here is the drive link : Leaked Solution Drive Anyone with this code has just copied from here .
I have would like to thank the entire Cheat Patrol team for exposing them. Special thanks to Vladosiya for actively helping us in the server and taking actions on convicted cheaters
If you are interested in volunteering us in exposing cheaters. You can join our Cheat Patrol server : Cheat Patrol Discord Server