# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
983398 | riariti | Bliskost (COI23_bliskost) | C++17 | 167 ms | 16568 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>
namespace MX {
constexpr int A = 26;
}
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
// consider string as a number in modulo 26
//
// call string a, b the 2 strings you need to check if close (after the op)
// clarification in first example (abc is string a, ced is string b)
//
// doing op (adding 11 to the pair) on string b is equivalent to subtracting
// string a, so we can keep string b constant
//
// we know how much to add on each position, consider an array that
// represents value needed to add to char in string a to get b start with 0,
// and construct bi - ai via the +1 on consec operation (and its reverse as
// mentioned above) for which array is it possible to build such an array so
// when added to ai you get bi
//
// lets call this array above c, ci = bi - ai for all i
//
// check selected problems: https://oj.uz/problem/view/COI23_bliskost for
// diagram
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |