Task: | LCS |
Sender: | rip |
Submission time: | 2017-09-12 17:04:48 +0300 |
Language: | C++ |
Status: | READY |
Result: | RUNTIME ERROR |
test | verdict | time | |
---|---|---|---|
#1 | RUNTIME ERROR | 0.30 s | details |
#2 | RUNTIME ERROR | 0.31 s | details |
#3 | RUNTIME ERROR | 0.31 s | details |
#4 | RUNTIME ERROR | 0.29 s | details |
#5 | RUNTIME ERROR | 0.33 s | details |
#6 | RUNTIME ERROR | 0.31 s | details |
#7 | RUNTIME ERROR | 0.29 s | details |
#8 | RUNTIME ERROR | 0.30 s | details |
#9 | RUNTIME ERROR | 0.32 s | details |
#10 | WRONG ANSWER | 0.04 s | details |
#11 | WRONG ANSWER | 0.04 s | details |
#12 | WRONG ANSWER | 0.05 s | details |
#13 | WRONG ANSWER | 0.04 s | details |
#14 | WRONG ANSWER | 0.04 s | details |
#15 | WRONG ANSWER | 0.04 s | details |
#16 | WRONG ANSWER | 0.03 s | details |
#17 | WRONG ANSWER | 0.03 s | details |
#18 | WRONG ANSWER | 0.04 s | details |
#19 | WRONG ANSWER | 0.04 s | details |
#20 | WRONG ANSWER | 0.04 s | details |
#21 | WRONG ANSWER | 0.03 s | details |
#22 | WRONG ANSWER | 0.05 s | details |
#23 | ACCEPTED | 0.04 s | details |
#24 | WRONG ANSWER | 0.03 s | details |
#25 | WRONG ANSWER | 0.04 s | details |
#26 | WRONG ANSWER | 0.04 s | details |
#27 | WRONG ANSWER | 0.04 s | details |
#28 | WRONG ANSWER | 0.03 s | details |
#29 | WRONG ANSWER | 0.04 s | details |
#30 | WRONG ANSWER | 0.04 s | details |
#31 | WRONG ANSWER | 0.04 s | details |
#32 | WRONG ANSWER | 0.03 s | details |
#33 | WRONG ANSWER | 0.03 s | details |
#34 | ACCEPTED | 0.04 s | details |
#35 | WRONG ANSWER | 0.05 s | details |
#36 | WRONG ANSWER | 0.04 s | details |
#37 | WRONG ANSWER | 0.05 s | details |
#38 | WRONG ANSWER | 0.04 s | details |
#39 | WRONG ANSWER | 0.04 s | details |
#40 | WRONG ANSWER | 0.04 s | details |
#41 | WRONG ANSWER | 0.05 s | details |
#42 | WRONG ANSWER | 0.04 s | details |
#43 | WRONG ANSWER | 0.04 s | details |
#44 | WRONG ANSWER | 0.05 s | details |
#45 | ACCEPTED | 0.05 s | details |
#46 | WRONG ANSWER | 0.04 s | details |
#47 | WRONG ANSWER | 0.04 s | details |
#48 | WRONG ANSWER | 0.04 s | details |
#49 | WRONG ANSWER | 0.05 s | details |
#50 | WRONG ANSWER | 0.04 s | details |
Code
#include <bits/stdc++.h> using namespace std; #define H (1<<19) int t[2*H]; int asd(int a, int b){ a+=H, b+=H; int V = 0; while(a<=b){ if(a%2==1) V = max(V, t[a++]); if(b%2==0) V = max(V, t[b--]); a/=2, b/=2; } return V; } int main(){ string n, m; cin >> n >> m; int N = n.size(), M = m.size(); for(int i=0; i<M; ++i){ for(int j=0; j<N; ++j){ if(m[i] == n[j]) t[j+H] = max(t[j+H], asd(0, j-1)+1); int k = j+H; for(k/=2; k>=1; k/=2) t[k] = max(t[2*k], t[2*k+1]); } } cout << asd(0, N); }
Test details
Test 1
Verdict: RUNTIME ERROR
input |
---|
vshvhhomxohhohvmhohhmoohyohlho... |
correct output |
---|
398 |
user output |
---|
(empty) |
Test 2
Verdict: RUNTIME ERROR
input |
---|
yiypiywiiniipnwynizpyiynypyzfi... |
correct output |
---|
295 |
user output |
---|
(empty) |
Test 3
Verdict: RUNTIME ERROR
input |
---|
aaeegvaaaeaoegkgegkdaeoeqageaa... |
correct output |
---|
706 |
user output |
---|
(empty) |
Test 4
Verdict: RUNTIME ERROR
input |
---|
xvcippfpowpkvxzgrhehyegefjkcvu... |
correct output |
---|
1000 |
user output |
---|
(empty) |
Test 5
Verdict: RUNTIME ERROR
input |
---|
plvpppvrrmpesvppmpekmkvmvvvvvp... |
correct output |
---|
141 |
user output |
---|
(empty) |
Test 6
Verdict: RUNTIME ERROR
input |
---|
wlllyylllmaalyalyywllcyllclyly... |
correct output |
---|
69 |
user output |
---|
(empty) |
Test 7
Verdict: RUNTIME ERROR
input |
---|
qzzzmzvhqzvzbnqhqqqqqzcqzzhhzd... |
correct output |
---|
576 |
user output |
---|
(empty) |
Test 8
Verdict: RUNTIME ERROR
input |
---|
vvabkkufhkakqovlkvkvkkavoakavd... |
correct output |
---|
907 |
user output |
---|
(empty) |
Test 9
Verdict: RUNTIME ERROR
input |
---|
hhmhhdhbhhruuhhqhnhdbhbibhiduu... |
correct output |
---|
758 |
user output |
---|
(empty) |
Test 10
Verdict: WRONG ANSWER
input |
---|
zujxcknxiwnxpjajmkmzxyjawshhsd... |
correct output |
---|
53 |
user output |
---|
55 |
Test 11
Verdict: WRONG ANSWER
input |
---|
aaaabaab baaaa |
correct output |
---|
4 |
user output |
---|
6 |
Test 12
Verdict: WRONG ANSWER
input |
---|
abbbbbaa abaaa |
correct output |
---|
4 |
user output |
---|
8 |
Test 13
Verdict: WRONG ANSWER
input |
---|
abababbb baaaa |
correct output |
---|
3 |
user output |
---|
5 |
Test 14
Verdict: WRONG ANSWER
input |
---|
abbaaaba ababb |
correct output |
---|
4 |
user output |
---|
7 |
Test 15
Verdict: WRONG ANSWER
input |
---|
aabbbbba ababa |
correct output |
---|
4 |
user output |
---|
8 |
Test 16
Verdict: WRONG ANSWER
input |
---|
aabaaaba babba |
correct output |
---|
4 |
user output |
---|
7 |
Test 17
Verdict: WRONG ANSWER
input |
---|
aabbabab abbba |
correct output |
---|
5 |
user output |
---|
6 |
Test 18
Verdict: WRONG ANSWER
input |
---|
aababaaa babbb |
correct output |
---|
3 |
user output |
---|
6 |
Test 19
Verdict: WRONG ANSWER
input |
---|
abbaaaaa aabaa |
correct output |
---|
4 |
user output |
---|
8 |
Test 20
Verdict: WRONG ANSWER
input |
---|
abaaaaba aabab |
correct output |
---|
4 |
user output |
---|
7 |
Test 21
Verdict: WRONG ANSWER
input |
---|
aabbabaa baabb |
correct output |
---|
4 |
user output |
---|
5 |
Test 22
Verdict: WRONG ANSWER
input |
---|
aababbba bbaab |
correct output |
---|
3 |
user output |
---|
6 |
Test 23
Verdict: ACCEPTED
input |
---|
aababbaa aabbb |
correct output |
---|
5 |
user output |
---|
5 |
Test 24
Verdict: WRONG ANSWER
input |
---|
abbbbaaa babaa |
correct output |
---|
4 |
user output |
---|
8 |
Test 25
Verdict: WRONG ANSWER
input |
---|
aaabbaba abaaa |
correct output |
---|
4 |
user output |
---|
7 |
Test 26
Verdict: WRONG ANSWER
input |
---|
aaaabaab bbaba |
correct output |
---|
3 |
user output |
---|
7 |
Test 27
Verdict: WRONG ANSWER
input |
---|
abaaaaab aabbb |
correct output |
---|
3 |
user output |
---|
7 |
Test 28
Verdict: WRONG ANSWER
input |
---|
aaaabaaa bbabb |
correct output |
---|
2 |
user output |
---|
7 |
Test 29
Verdict: WRONG ANSWER
input |
---|
abbbaaab babaa |
correct output |
---|
4 |
user output |
---|
7 |
Test 30
Verdict: WRONG ANSWER
input |
---|
aaabbaba abbaa |
correct output |
---|
5 |
user output |
---|
7 |
Test 31
Verdict: WRONG ANSWER
input |
---|
abbbbabb bbbbb |
correct output |
---|
5 |
user output |
---|
6 |
Test 32
Verdict: WRONG ANSWER
input |
---|
ababbbbb abbaa |
correct output |
---|
3 |
user output |
---|
7 |
Test 33
Verdict: WRONG ANSWER
input |
---|
abaaabab abbba |
correct output |
---|
4 |
user output |
---|
6 |
Test 34
Verdict: ACCEPTED
input |
---|
aababbba bbbba |
correct output |
---|
5 |
user output |
---|
5 |
Test 35
Verdict: WRONG ANSWER
input |
---|
abbbabba baabb |
correct output |
---|
4 |
user output |
---|
6 |
Test 36
Verdict: WRONG ANSWER
input |
---|
abbbbaba bbbba |
correct output |
---|
5 |
user output |
---|
6 |
Test 37
Verdict: WRONG ANSWER
input |
---|
abaaabbb baabb |
correct output |
---|
5 |
user output |
---|
7 |
Test 38
Verdict: WRONG ANSWER
input |
---|
aaaababa bbbaa |
correct output |
---|
3 |
user output |
---|
6 |
Test 39
Verdict: WRONG ANSWER
input |
---|
abaabbbb bbabb |
correct output |
---|
4 |
user output |
---|
7 |
Test 40
Verdict: WRONG ANSWER
input |
---|
ababbaaa babab |
correct output |
---|
4 |
user output |
---|
7 |
Test 41
Verdict: WRONG ANSWER
input |
---|
aaabbbba bbbab |
correct output |
---|
4 |
user output |
---|
7 |
Test 42
Verdict: WRONG ANSWER
input |
---|
abaaaaaa baabb |
correct output |
---|
3 |
user output |
---|
7 |
Test 43
Verdict: WRONG ANSWER
input |
---|
aaabbbab baaab |
correct output |
---|
4 |
user output |
---|
7 |
Test 44
Verdict: WRONG ANSWER
input |
---|
aaabbbbb abaab |
correct output |
---|
4 |
user output |
---|
8 |
Test 45
Verdict: ACCEPTED
input |
---|
aaabaabb bbbbb |
correct output |
---|
3 |
user output |
---|
3 |
Test 46
Verdict: WRONG ANSWER
input |
---|
aabaaaba aabaa |
correct output |
---|
5 |
user output |
---|
7 |
Test 47
Verdict: WRONG ANSWER
input |
---|
aabbbabb aabaa |
correct output |
---|
4 |
user output |
---|
7 |
Test 48
Verdict: WRONG ANSWER
input |
---|
aaaabbaa abaab |
correct output |
---|
4 |
user output |
---|
8 |
Test 49
Verdict: WRONG ANSWER
input |
---|
abbbbbaa bbbaa |
correct output |
---|
5 |
user output |
---|
7 |
Test 50
Verdict: WRONG ANSWER
input |
---|
abaabbbb abaaa |
correct output |
---|
4 |
user output |
---|
7 |