#include <iostream>
#include <vector>
#include <algorithm> using namespace std; int main(){
int n,m;
cin >> n >> m;
vector<vector<int> > a(n,vector<int>(m,));
for(int i = ; i < n; ++ i){
for(int j = ; j < m ; ++ j){
cin >> a[i][j];
}
}
if(n%) cout<<n<<endl;
else{
int left= ,right =n-, preRight = n-;
while(left < right){
if(a[left] != a[right]) break;
else left++,right--;
if(left- == right) left = ,preRight = right;
}
cout<<preRight+<<endl;
}
}
相关文章
- Codeforces Round #251 (Div. 2) B. Devu, the Dumb Guy
- Codeforces Round #350 (Div. 2) B. Game of Robots __ interesting
- 【找规律】Divide by Zero 2017 and Codeforces Round #399 (Div. 1 + Div. 2, combined) B. Code For 1
- 贪心 Codeforces Round #303 (Div. 2) B. Equidistant String
- Codeforces Round #355 (Div. 2) B. Vanya and Food Processor 水题
- Codeforces Round #246 (Div. 2) —B. Football Kit
- DFS Codeforces Round #290 (Div. 2) B. Fox And Two Dots
- Codeforces Round #243 (Div. 2) B(思维模拟题)
- Codeforces Round #425 (Div. 2) B. Petya and Exam(字符串模拟 水)
- Codeforces Round #170 (Div. 2) B. New Problem(好题)