# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
524494 | Jarif_Rahman | Necklace (Subtask 1-3) (BOI19_necklace1) | C++17 | 1584 ms | 108884 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;
vector<str> lex(str s){
int n = s.size();
char a = *min_element(s.begin(), s.end());
vector<int> c;
for(int i = 0; i < n; i++) if(s[i] == a) c.pb(i);
vector<str> rt;
auto startswith = [&s, &n](int k){
str rt = "";
for(int i = k; i < n; i++) rt+=s[i];
for(int i = 0; i < k; i++) rt+=s[i];
return rt;
};
if(c.size() == 1) return {startswith(c[0])};
int mn = 1e9, k = -1;
for(int i = 0; i < c.size(); i++){
int ii = (i+1)%c.size();
int cur = c[i]+1;
cur+=n-c[ii];
컴파일 시 표준 에러 (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... |