Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
51513 | _JF_ | 最优子序列 | C++ | 运行超时 | 0 | 1000 MS | 252 KB | 1040 | 2022-07-13 11:49:10 |
using namespace std; int n; string q; int main() { int maxx=-INT_MAX; int n,m,Type,last; cin>>n>>m>>Type; string s; cin>>s; string p; for(int i=1; i<=n; i++) { for(int j=i; j<=n; j++) { int now=-1; for(int k=1; k<=n;k++) { if(k<i||k>j) { now++; q[now]=s[k-1]; } } bool flag=true; for(int ii=0; ii<=now; ii++) { for(int jj=ii+1; jj<=now; jj++) { for(int k=jj+1; k<=now; k++) { if(q[ii]==q[k]&&q[ii]!=q[jj]) flag=false; } } } if(now>=2&&flag==true) { if(maxx<now+1) { maxx=max(maxx,now+1); for(int k=0;k<=now;k++) p[k]=q[k]; last=now; } } } } if(Type==0) cout<<maxx<<endl; else { cout<<maxx<<endl; for(int k=0;k<=last;k++) cout<<p[k]; } return 0; }
20 12 0
jhlbfajhlbfajhlbfaag
9
10
wrong answer The length is wrong: expected = 10, found = 9
exit code: 0, checker exit code: 1
20 12 0
ehjbehjbehjbkhlckhlc
6
10
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 1
200 4 0
abababababababababababababababababababababababababababababdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdaadcbcbcbcbcbcbc...
101
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
200 4 0
dbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbdbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcccccccccccccccccccccccccccccccccccccccccccccccccdcdcdcbb...
128
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
200 12 0
idljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljidljelhdelhdelhdelhdelhdelhdelhdelhdkdliehfichficl...
57
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
200 12 0
gbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfgbalfaebgaebgjahldijahldijahldijahldijahldijahldijahldijahldijahldijahldijahldicgkhea...
47
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
200 12 1
cgiahcgiahcgiahcgiahcgiahcgiahcgiahcgiahcgiahcgiahcgiahcgiahcgiahcgiahcgiahcgiahcgiahcfacfacfacfacfacfacfalkcglkcglkcglkcglkcglkcglkcglkcglkcglkcglkcglkcglkcglkcglkcglkcglkcglkcglgfalgfaifbi...
54
aaaaaaaaaaaaaaaaaaaaaaaalkccccccccccccccccccggfffbbbbi
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
200 12 1
gacbegacbegacbegacbegacbegacbegacbegacbegacbegacbegacbegacbegacbegacbegacbegacbegacbegacbegacbegacbekfjkfjkfjkfjkfjkfjkfjkfjkfjkfjkfjcekgdcekgdcekgdcekgdcekgdcekgdcekgdcekgdcekgdiefajiefajie...
51
aaaaaaaaaaaaaaaaaaaabekkkkkkkkkkkkdddddddddfffjjicg
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
200 12 2
jaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeiljaeilhalkhalkhalkcjg...
48
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeihhhcjfkbdgl
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
200 12 2
jhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgajhgacjlfedcjlfedcjlfedcjlfedcjlfedcjlfedcjlfedcjlfedcjlfedcjlf...
51
hgaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacccccccccccjlfed
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
3000 12 0
fejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejbhfejb...
607
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
3000 12 0
dhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhefjdhef...
661
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
3000 12 1
eihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihdjeihd...
837
hddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddiiiiiiiiiiiiiiiiiiiiiiiiiiii...
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
3000 12 1
ekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjdlekjd...
607
ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd...
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
3000 12 2
jbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbhflkjbh...
585
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbhfkaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
3000 12 2
gbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbjaekgbj...
517
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
3000 12 2
fjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjladfjla...
629
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
3000 12 2
fdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihfdihf...
758
ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd...
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
3000 12 2
dhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgjbdhgj...
615
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0
3000 12 2
jlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbdgjlbd...
583
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
wrong answer The length is wrong: expected = 10, found = 6
exit code: 0, checker exit code: 0