#include <iostream> #include<vector> using namespace std; int pingshu(int x,int y,int a,int b){ int N=x+y; int x1=x,x2=x; int y1=y,y2=y; while(x>=a||y>=b){ x1=x%a; x2=x/a; y1=y%b; y2=y/b; N+=x2+y2; x=x1+y2; y=y1+x2; } return N; } int findmax(vector<int>&v,int n){ int max=...