| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 329813 | theshadow_04 | Selling RNA Strands (JOI16_selling_rna) | C++14 | 1519 ms | 15340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// V T An
#include <bits/stdc++.h>
#define F first
#define S second
#define MOD 1000000007
#define pb push_back
#define ll long long
#define Task "SELLINGRNA"
using namespace std;
const int maxn = 100005;
int n, m, len[maxn];
string s[maxn];
int main() {
ios_base::sync_with_stdio(0);
cout.tie(0); cin.tie(0);
if(fopen(Task".inp", "r")){
freopen(Task".inp", "r", stdin);
freopen(Task".out", "w", stdout);
}
cin >> n >> m;
for(int i = 1; i <= n; ++i) {
cin >> s[i];
len[i] = s[i].length();
s[i] = " " + s[i];
}
for(int i = 1; i <= m; ++i) {
int ans = 0;
string p, q; cin >> p >> q;
for(int j = 1; j <= n; ++ j) {
string cur = s[j].substr(1, (int) p.size());
if(cur != p) continue;
cur = s[j].substr(len[j] - q.size() + 1, (int) q.size());
if(cur == q) ans ++;
}
cout << ans << "\n";
}
}
// CHY-AKAV
컴파일 시 표준 에러 (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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
