提交时间:2023-10-07 13:44:21

运行 ID: 105629

#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c=0; cin >> a >> b; int m=max(a,b),l=min(a,b); bool v[a][b] = {false}; for(int i=0;i<l;i++){ if(a > 1 || b >1){ for(int x=0;x<l;x++){ for(int y=0;y<l;y++){ v[x][y]=true; } } c++; m-=l; } else c+max(m,l); } cout << c+1; return 0; } /*1 1 1 1 1 1 1 1 1 1 1 1 */