# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
398272 | mars | 세 명의 친구들 (BOI14_friends) | C++14 | 58 ms | 7088 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/**
* A valid solution for task FRIENDS.
*
* Author: Marijonas Petrauskas
*/
#include <iostream>
#include <string>
using namespace std;
string try_candidate(const string &s, int orig_start, int orig_len, int modified_start) {
bool was_mismatch = false;
int orig = orig_start, mod = modified_start, i = 0;
while (i < orig_len) {
if (s[orig] != s[mod]) {
if (was_mismatch)
return string();
was_mismatch = true;
mod++;
} else
orig++, mod++, i++;
}
return s.substr(orig_start, orig_len);
}
int main() {
string final;
int N;
cin >> N;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |