# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
891227 | SorahISA | Crossing (JOI21_crossing) | C++17 | 6036 ms | 7076 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.
#ifndef SorahISA
#define SorahISA
#include SorahISA __FILE__ SorahISA
string XOR(string S, string T) {
string res(SZ(S), '?');
for (int i = 0; i < SZ(S); ++i) {
if (S[i] == T[i]) res[i] = S[i];
else res[i] = int('J') + int('O') + int('I') - int(S[i]) - int(T[i]);
}
return res;
}
void solve() {
int N; cin >> N;
vector<string> strs(8);
cin >> strs[1] >> strs[2] >> strs[4];
strs[3] = XOR(strs[1], strs[2]);
strs[5] = XOR(strs[1], strs[4]);
strs[6] = XOR(strs[2], strs[4]);
strs[7] = XOR(strs[3], strs[4]);
// for (int i = 1; i <= 7; ++i) debug(i, strs[i]);
// for (int i = 1; i <= 7; ++i) {
// assert(XOR(strs[i], strs[i]) == strs[i]);
// for (int j = i+1; j <= 7; ++j) {
// assert(XOR(strs[i], strs[j]) == strs[i^j]);
// }
// }
# | 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... |