# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
472230 | _L__ | Zamjena (COCI18_zamjena) | C++17 | 145 ms | 18544 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.
// This code is written by _L__
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define F_word ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
typedef long long ll;
typedef long double ld;
const ll mod = 1e9+7, N = 1e5+30, INF = 1e18;
const ld E = 1e-6;
bool an_int(string s){
return (s[0] >= '1' && s[0] <= '9');
}
bool a_word(string s){
return (s[0] >= 'a' && s[0] <= 'z');
}
vector<int> G[N+4];bool vis[N+3];int n; set<int> st;
vector<string> v(N+3), x(N+5);
void dfs(int node){
if(vis[node]) return;
vis[node] = 1;
if(node>n && an_int(x[node-n])){
ll c = 0;
for(auto b: x[node-n]){c*=10;c+=(b-'0');}
st.insert(c);
} else if(an_int(v[node])){
ll c = 0;
for(auto b: v[node]){c*=10;c+=(b-'0');}
st.insert(c);
}
# | 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... |