ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#210917 | #2067. 肉夹馍 | three_zero30 | 0 | 1ms | 1288kb | C++11 | 548b | 2024-08-08 10:19:47 | 2024-08-08 14:28:30 |
answer
#include<bits/stdc++.h>
#define ll long long
using namespace std;
string s;
const int N=2000005;
unordered_map<string,bool> mp;
string sb,str;
int d0,mid;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cin>>s;
for(int i=1;i<=s.length();i++){
bool f=0;
mp[s.substr(0,i)]=1;
d0=(i/2)-!(i%2);
mid=0;
for(int j=21;j>=0;j--){
if(mid+(1<<j)>d0)continue;
int td=mid+(1<<j);
if(mp[s.substr(i-td,td)]==1){
mid=td;
}
}
cout<<mid<<' ';
}
return 0;
}
详细
小提示:点击横条可展开更详细的信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 1288kb
input:
qpbvqpbvqpbvavdqpbvqpbvqpbvavdqpbvqpbvqpbvavdfnfninqpbvqpbvqpbvavdqpbvqpbvqpbvavdqpbvqpbvqpbvavd
output:
0 0 0 0 1 2 0 0 1 2 0 4 0 0 0 1 2 0 4 1 2 0 8 1 2 0 12 0 0 0 1 2 0 4 1 2 0 8 1 2 0 12 0 0 0 0 0 0 0 ...
result:
wrong answer 7th words differ - expected: '3', found: '0'
Subtask #2:
score: 0
Skipped
Subtask #3:
score: 0
Skipped
Subtask #4:
score: 0
Skipped