# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
735132 | Farhan_HY | Bajka (COCI20_bajka) | C++14 | 2 ms | 2280 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define int long long
#define F first
#define S second
#define T int tc; cin >> tc; while(tc--)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
const int inf = 1e18;
const int N = 1e6 + 5;
const int M = 505;
const int LOG = 32;
const int CHAR = 26;
const int mod = 1e9 + 7;
const int mod2 = 998244353;
const float pi = atan(1) * 4;
const int dx[] = {1, 0, 0, -1};
const int dy[] = {0, -1, 1, 0};
const char d[] = {'E', 'N', 'S', 'W'};
int n, m, dp[M][M];
string s, ss;
vector<int> pos[CHAR];
int Rec(int i, int j) {
if (j == m) return 0;
int &ret = dp[i][j];
if (ret != -1) return ret;
ret = inf;
if (i - 1 >= 1 && s[i - 1] == ss[j + 1]) ret = min(ret, Rec(i - 1, j + 1) + 1);
if (i + 1 <= m && s[i + 1] == ss[j + 1]) ret = min(ret, Rec(i + 1, j + 1) + 1);
for(auto x: pos[s[i] - 'a']) {
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |