# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
367995 | SeekingOblivion | Round words (IZhO13_rowords) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
//#define fin cin
//#define fout cout
using namespace std;
ifstream fin("date.in");
ofstream fout("date.out");
int n,st,f[26],i,St[4010],Dr[4010],m;
char c[4010],s[4010];
vector<int> aint;
struct Nod{
char val;
int f[26];
} blanc;
vector<Nod> v;
vector<int> l[4001],car[27];
void add(int p,int en,int nod)
{
int next;
if(v[nod].f[c[p]-'a']==0)
{
next=v.size();
blanc.val=next;
v.push_back(blanc);
l[nod].push_back(next);
car[c[p]-'a'].push_back(nod);
}
else next=v[nod].f[c[p]-'a'];
if(p!=en) add(p+1,en,next);
}