QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#839870 | #9925. LR String | xx | WA | 30ms | 3712kb | C++23 | 791b | 2025-01-02 11:22:12 | 2025-01-02 11:22:20 |
Judging History
answer
#include <bits/stdc++.h>
#define int long long
#define endl '\n'
#define fi first
#define se second
using namespace std;
using PII = pair<int, int>;
using PSS = pair<string, string>;
const int N = 1e6 + 10, M = 1e3 + 10, INF = 0x3f3f3f3f3f3f3f3f, MOD = 1e9 + 7;
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, 1, 0, -1};
int a[N];
inline void solve() {
string s; cin >> s;
int n; cin >> n;
for (int i = 1; i <= n; ++ i) {
string t; cin >> t;
if (s.find(t) != -1) {
cout << "YES" << '\n';
}
else cout << "NO" << '\n';
}
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr), cout.tie(nullptr);
int T = 1;
cin >> T;
while(T -- ) {
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3712kb
input:
2 RRLLRRLL 4 LLLLL LLR LRLR R RLLLLLL 3 LLLLL RL RRL
output:
NO YES NO YES YES YES NO
result:
ok 7 lines
Test #2:
score: -100
Wrong Answer
time: 30ms
memory: 3464kb
input:
100000 RRLLR 4 R R R R LRLLL 6 R L L L L R RLLRR 1 L LRLLL 3 R L L RLRRL 2 LRRRR RRRL LRLRR 2 L R RRLRL 4 RLRLR RLLL LR RLL RLRLL 8 R R R L L L R L RLLRR 7 R LL RL R L L L LLRLR 2 L R RRRRL 1 RLLLR RRLLL 2 L L RLLRL 1 RLLRL LRLLL 5 RLRLL RLLLR RRRRL LLRRR RLLRR LRLLL 3 RRLL R RL LLRRL 3 L R LLLRR RR...
output:
YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO NO YES YES NO NO YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES NO NO NO NO NO NO YES YES YES YES NO NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES NO ...
result:
wrong answer 5th lines differ - expected: 'NO', found: 'YES'