# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
447374 | 2021-07-26T08:01:04 Z | osmanallazov | Palindromic Partitions (CEOI17_palindromic) | C++14 | 10000 ms | 4196 KB |
#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<<endl; say=0; x.clear(); y.clear(); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 1 ms | 204 KB | Output is correct |
7 | Correct | 1 ms | 204 KB | Output is correct |
8 | Correct | 1 ms | 204 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 1 ms | 204 KB | Output is correct |
7 | Correct | 1 ms | 204 KB | Output is correct |
8 | Correct | 1 ms | 204 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 16 ms | 396 KB | Output is correct |
11 | Correct | 12 ms | 404 KB | Output is correct |
12 | Correct | 9 ms | 204 KB | Output is correct |
13 | Correct | 4 ms | 204 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 1 ms | 204 KB | Output is correct |
7 | Correct | 1 ms | 204 KB | Output is correct |
8 | Correct | 1 ms | 204 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 16 ms | 396 KB | Output is correct |
11 | Correct | 12 ms | 404 KB | Output is correct |
12 | Correct | 9 ms | 204 KB | Output is correct |
13 | Correct | 4 ms | 204 KB | Output is correct |
14 | Execution timed out | 10082 ms | 4196 KB | Time limit exceeded |
15 | Halted | 0 ms | 0 KB | - |