# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
141638 | RaresRosca | Lozinke (COCI17_lozinke) | C++14 | 270 ms | 2424 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <set>
using namespace std;
int l=1,n,i,j,k,sol;
string ch[20010],c;
set <string> s;
map <string, int> m;
int cmp(string a, string b){
if(a.size()!=b.size())
return a.size()<b.size();
else
return a<b;
}
int main(){
cin>>n;
for(i=1;i<=n;i++)
cin>>ch[i];
sort(ch+1,ch+n+1,cmp);
for(i=1;i<=n;i++){
s.clear();
for(j=0;j<ch[i].size();j++){
c.erase(c.begin(),c.end());
for(k=j;k<ch[i].size();k++){
c.push_back(ch[i][k]);
s.insert(c);
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |