Submission #752294
Source Code Expand
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
int main(){
int a_num=0;
int b_num=0;
//int string_c_num=0;
string input;
cin >> input;
int all_num = input.size();
int count =0;
for(int a_num =1 ;a_num<all_num;a_num++){
for(int b_num=1;b_num<all_num-2*a_num;b_num++){
//cout << a_num <<endl;
//cout << b_num << endl;
int c_num_base = (all_num-2*a_num-b_num);
if(c_num_base%2==1 || c_num_base <=0){
//cout << "continue" << endl;
continue;
}
int c_num = c_num_base/2;
/*cout << "start" << endl;
cout << input.substr(0,a_num) <<endl;
cout <<input.substr(a_num+b_num+c_num,a_num)<< endl;
cout << input.substr(a_num+b_num,c_num) << endl;
cout <<input.substr(a_num+b_num+c_num+a_num,c_num) <<endl;
cout << "end" << endl;*/
if (input.substr(0,a_num) == input.substr(a_num+b_num+c_num,a_num)&&input\
.substr(a_num+b_num,c_num) == input.substr(a_num+b_num+c_num+a_num,c_num)){
//cout << input.substr(0,a_num) <<endl;
//cout << input.substr(a_num+b_num,c_num) << endl;
count++;
}
}
}
cout << count <<endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | C - ABCAC |
| User | kyokote |
| Language | C++14 (GCC 5.4.1) |
| Score | 20 |
| Code Size | 1652 Byte |
| Status | TLE |
| Exec Time | 5257 ms |
| Memory | 692 KiB |
Judge Result
| Set Name | Sample | Subtask | All | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 20 / 20 | 0 / 80 | ||||||||
| Status |
|
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 0_000.txt, 0_001.txt, 0_002.txt |
| Subtask | 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt, 1_010.txt, 1_011.txt, 1_012.txt, 1_013.txt, 1_014.txt, 1_015.txt, 1_016.txt, 1_017.txt, 1_018.txt, 1_019.txt, 1_020.txt, 1_021.txt, 1_022.txt, 1_023.txt, 1_024.txt, 1_025.txt, 1_026.txt |
| All | 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt, 1_010.txt, 1_011.txt, 1_012.txt, 1_013.txt, 1_014.txt, 1_015.txt, 1_016.txt, 1_017.txt, 1_018.txt, 1_019.txt, 1_020.txt, 1_021.txt, 1_022.txt, 1_023.txt, 1_024.txt, 1_025.txt, 1_026.txt, 2_027.txt, 2_028.txt, 2_029.txt, 2_030.txt, 2_031.txt, 2_032.txt, 2_033.txt, 2_034.txt, 2_035.txt, 2_036.txt, 2_037.txt, 2_038.txt, 2_039.txt, 2_040.txt, 2_041.txt, 2_042.txt, 2_043.txt, 2_044.txt, 2_045.txt, 2_046.txt, 2_047.txt, 2_048.txt, 2_049.txt, 2_050.txt, 2_051.txt, 2_052.txt, 2_053.txt, 2_054.txt, 2_055.txt, 2_056.txt, 2_057.txt, 2_058.txt, 2_059.txt, 2_060.txt, 2_061.txt, 2_062.txt, 2_063.txt, 2_064.txt, 2_065.txt, 2_066.txt, 2_067.txt, 2_068.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 0_000.txt | AC | 4 ms | 256 KiB |
| 0_001.txt | AC | 4 ms | 256 KiB |
| 0_002.txt | AC | 4 ms | 256 KiB |
| 1_003.txt | AC | 4 ms | 256 KiB |
| 1_004.txt | AC | 4 ms | 256 KiB |
| 1_005.txt | AC | 4 ms | 256 KiB |
| 1_006.txt | AC | 4 ms | 256 KiB |
| 1_007.txt | AC | 149 ms | 256 KiB |
| 1_008.txt | AC | 149 ms | 256 KiB |
| 1_009.txt | AC | 153 ms | 256 KiB |
| 1_010.txt | AC | 153 ms | 256 KiB |
| 1_011.txt | AC | 25 ms | 256 KiB |
| 1_012.txt | AC | 50 ms | 256 KiB |
| 1_013.txt | AC | 55 ms | 256 KiB |
| 1_014.txt | AC | 9 ms | 256 KiB |
| 1_015.txt | AC | 30 ms | 256 KiB |
| 1_016.txt | AC | 151 ms | 256 KiB |
| 1_017.txt | AC | 152 ms | 256 KiB |
| 1_018.txt | AC | 153 ms | 256 KiB |
| 1_019.txt | AC | 151 ms | 256 KiB |
| 1_020.txt | AC | 153 ms | 256 KiB |
| 1_021.txt | AC | 149 ms | 256 KiB |
| 1_022.txt | AC | 149 ms | 256 KiB |
| 1_023.txt | AC | 318 ms | 256 KiB |
| 1_024.txt | AC | 319 ms | 256 KiB |
| 1_025.txt | AC | 321 ms | 256 KiB |
| 1_026.txt | AC | 318 ms | 256 KiB |
| 2_027.txt | TLE | 5257 ms | 684 KiB |
| 2_028.txt | TLE | 5257 ms | 684 KiB |
| 2_029.txt | TLE | 5257 ms | 692 KiB |
| 2_030.txt | TLE | 5257 ms | 684 KiB |
| 2_031.txt | TLE | 5257 ms | 692 KiB |
| 2_032.txt | TLE | 5253 ms | 684 KiB |
| 2_033.txt | TLE | 5257 ms | 692 KiB |
| 2_034.txt | TLE | 5253 ms | 692 KiB |
| 2_035.txt | TLE | 5253 ms | 692 KiB |
| 2_036.txt | TLE | 5257 ms | 692 KiB |
| 2_037.txt | TLE | 5257 ms | 384 KiB |
| 2_038.txt | TLE | 5257 ms | 384 KiB |
| 2_039.txt | TLE | 5257 ms | 640 KiB |
| 2_040.txt | TLE | 5257 ms | 384 KiB |
| 2_041.txt | TLE | 5257 ms | 512 KiB |
| 2_042.txt | TLE | 5257 ms | 692 KiB |
| 2_043.txt | TLE | 5257 ms | 684 KiB |
| 2_044.txt | TLE | 5253 ms | 684 KiB |
| 2_045.txt | TLE | 5257 ms | 684 KiB |
| 2_046.txt | TLE | 5257 ms | 684 KiB |
| 2_047.txt | TLE | 5257 ms | 684 KiB |
| 2_048.txt | TLE | 5257 ms | 684 KiB |
| 2_049.txt | TLE | 5257 ms | 684 KiB |
| 2_050.txt | TLE | 5257 ms | 684 KiB |
| 2_051.txt | TLE | 5257 ms | 692 KiB |
| 2_052.txt | TLE | 5253 ms | 692 KiB |
| 2_053.txt | TLE | 5253 ms | 692 KiB |
| 2_054.txt | TLE | 5253 ms | 692 KiB |
| 2_055.txt | TLE | 5257 ms | 684 KiB |
| 2_056.txt | TLE | 5253 ms | 692 KiB |
| 2_057.txt | TLE | 5257 ms | 684 KiB |
| 2_058.txt | TLE | 5253 ms | 692 KiB |
| 2_059.txt | TLE | 5257 ms | 684 KiB |
| 2_060.txt | TLE | 5256 ms | 692 KiB |
| 2_061.txt | TLE | 5257 ms | 692 KiB |
| 2_062.txt | TLE | 5257 ms | 684 KiB |
| 2_063.txt | TLE | 5257 ms | 692 KiB |
| 2_064.txt | TLE | 5257 ms | 684 KiB |
| 2_065.txt | TLE | 5257 ms | 684 KiB |
| 2_066.txt | TLE | 5253 ms | 692 KiB |
| 2_067.txt | TLE | 5253 ms | 684 KiB |
| 2_068.txt | TLE | 5257 ms | 684 KiB |