|
|
вернуться в форумWhat is the test case 10 ??? #include<cstdio> #include<cstring> #include<cassert> #include<vector> #include<list> #include<queue> #include<map> #include<set> #include<deque> #include<stack> #include<bitset> #include<algorithm> #include<functional> #include<numeric> #include<utility> #include<sstream> #include<iostream> #include<iomanip> #include<cmath> #include<cstdlib> #include<ctime> #include<fstream> #include<typeinfo> #include<locale> #include<iterator> #include<valarray> #include<complex> using namespace std; int main() { int n,m; while(cin>>n>>m){ int sum = 0,flag = 0,count = -1,x=n*m; n--; if(n==0 || m==0){ cout<<"0"<<endl; continue; } while(sum < x){ if(flag==0){ sum += m; flag = 1; m--; } else if(flag==1){ sum += n; flag = 0; n--; } count++; } cout<<count<<endl; } return 0; } here is my code, it has got verdict WA in test case 10.... |
|
|