# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
447372 | osmanallazov | Palindromic Partitions (CEOI17_palindromic) | C++14 | 1 ms | 204 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main() {
int t,say=0;
cin>>t;
string s,x,y;
while(t--){
cin>>s;
for(int i=0;i<s.length()/2;i++){
x=x+s[i];
y=s[s.length()-1-i]+y;
if(x==y){
say++;
say++;
x.clear();
y.clear();
}
}
if(s.length()%2==1 || x.length()>0){
say++;
}
cout<<say;
say=0;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |