Submission #36827190
Source Code Expand
Copy
#include<iostream>#define ll long longusing namespace std;int main(){string s, t; cin >> s >> t;for (int i = 0; i < s.size(); i++) {for (int j = i; j - i < t.size(); j++) {if (j >= s.size()) {cout << "No";return 0;}if (t[j-i] != s[j]) {break;}if (j - i == t.size()-1) {cout << "Yes";return 0;}
#include<iostream> #define ll long long using namespace std; int main(){ string s, t; cin >> s >> t; for (int i = 0; i < s.size(); i++) { for (int j = i; j - i < t.size(); j++) { if (j >= s.size()) { cout << "No"; return 0; } if (t[j-i] != s[j]) { break; } if (j - i == t.size()-1) { cout << "Yes"; return 0; } } } }
Submission Info
Submission Time | |
---|---|
Task | B - LOOKUP |
User | kaylous |
Language | C++ (Clang 10.0.0) |
Score | 0 |
Code Size | 522 Byte |
Status | WA |
Exec Time | 6 ms |
Memory | 3116 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt |
All | hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt, test_31.txt, test_32.txt, test_33.txt, test_34.txt, test_35.txt, test_36.txt, test_37.txt, test_38.txt, test_39.txt, test_40.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
hand_01.txt | AC | 6 ms | 3028 KB |
hand_02.txt | AC | 2 ms | 2908 KB |
hand_03.txt | AC | 2 ms | 3012 KB |
hand_04.txt | AC | 3 ms | 2828 KB |
sample_01.txt | AC | 2 ms | 2848 KB |
sample_02.txt | WA | 2 ms | 3008 KB |
sample_03.txt | AC | 2 ms | 2828 KB |
sample_04.txt | AC | 3 ms | 3008 KB |
test_01.txt | AC | 2 ms | 2808 KB |
test_02.txt | WA | 2 ms | 2944 KB |
test_03.txt | WA | 2 ms | 2904 KB |
test_04.txt | AC | 2 ms | 2864 KB |
test_05.txt | AC | 2 ms | 3028 KB |
test_06.txt | AC | 3 ms | 2952 KB |
test_07.txt | AC | 2 ms | 3008 KB |
test_08.txt | AC | 2 ms | 2952 KB |
test_09.txt | WA | 2 ms | 2860 KB |
test_10.txt | AC | 2 ms | 3008 KB |
test_11.txt | AC | 2 ms | 2996 KB |
test_12.txt | AC | 2 ms | 2952 KB |
test_13.txt | AC | 2 ms | 3028 KB |
test_14.txt | AC | 2 ms | 2940 KB |
test_15.txt | WA | 2 ms | 2840 KB |
test_16.txt | AC | 1 ms | 3000 KB |
test_17.txt | WA | 2 ms | 2900 KB |
test_18.txt | AC | 2 ms | 2828 KB |
test_19.txt | WA | 2 ms | 3004 KB |
test_20.txt | AC | 2 ms | 2816 KB |
test_21.txt | WA | 2 ms | 3020 KB |
test_22.txt | WA | 2 ms | 2864 KB |
test_23.txt | WA | 2 ms | 3020 KB |
test_24.txt | WA | 2 ms | 2820 KB |
test_25.txt | WA | 2 ms | 3016 KB |
test_26.txt | AC | 2 ms | 2808 KB |
test_27.txt | WA | 2 ms | 3040 KB |
test_28.txt | WA | 2 ms | 3024 KB |
test_29.txt | AC | 2 ms | 3012 KB |
test_30.txt | WA | 2 ms | 2824 KB |
test_31.txt | AC | 1 ms | 3028 KB |
test_32.txt | WA | 1 ms | 2900 KB |
test_33.txt | WA | 2 ms | 2812 KB |
test_34.txt | AC | 2 ms | 3116 KB |
test_35.txt | AC | 2 ms | 3024 KB |
test_36.txt | WA | 2 ms | 3024 KB |
test_37.txt | AC | 2 ms | 3048 KB |
test_38.txt | AC | 2 ms | 2808 KB |
test_39.txt | WA | 2 ms | 3008 KB |
test_40.txt | WA | 2 ms | 2900 KB |