#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;
}
}
相关文章
- Educational Codeforces Round 78 (Rated for Div. 2) B. A and B
- Educational Codeforces Round 78 (Rated for Div. 2)B. A and B(1~n的分配)
- Codeforces Round #299 (Div. 2) B. Tavas and SaDDas 水题
- DFS Codeforces Round #299 (Div. 2) B. Tavas and SaDDas
- Codeforces Round #302 (Div. 2) B. Sea and Islands 构造
- Codeforces Round #321 (Div. 2) B. Kefa and Company 二分
- Codeforces Round #307 (Div. 2) B. ZgukistringZ 暴力
- Codeforces Round #497 (Div. 2)B. Turn the Rectangles
- Codeforces Round #131 (Div. 2) B. Hometask dp
- Codeforces Beta Round #9 (Div. 2 Only) B. Running Student 水题