# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
902558 | qin | Crossing (JOI21_crossing) | C++17 | 391 ms | 45736 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>
#define fi first
#define se second
#define ssize(x) int(x.size())
#define pn printf("\n")
#define all(x) x.begin(),x.end()
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
int inf = 2e09; ll infll = 2e18;
vector<string> get_strings(string &xx, string &y, string &z){
string s[3] = {xx, y, z};
int n = int(s[0].length());
map<string, int> mp;
queue<string> q;
for(int l = 0; l < 3; ++l) mp[s[l]] = 1, q.emplace(s[l]);
char t[3] = {'J', 'O', 'I'};
//~ int cnt = 0;
vector<string> ret;
while(!q.empty()){
string x = q.front(); q.pop();
string tt = ""; tt.resize(n);
for(int l = 0; l < 3; ++l){
for(int i = 0; i < n; ++i) if(x[i] == s[l][i]) tt[i] = x[i];
else{
int a, b;
for(int j = 0; j < 3; ++j) if(t[j] == x[i]) a = j;
for(int j = 0; j < 3; ++j) if(t[j] == s[l][i]) b = j;
if(a && b) tt[i] = t[0];
else if(max(a, b) > 1) tt[i] = t[1];
Compilation message (stderr)
# | 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... |