MLE看过来

P2907 [USACO08OPEN] Roads Around The Farm S

谢谢
by Do_Right @ 2018-11-03 20:21:50


``` #include <iostream> using namespace std; int nog = 1; int sep(int cow,int a) { if(cow == a) return 0; if(cow == 0) return 0; if((cow - a) % 2 == 0) { nog++; sep((cow - a) / 2 + a,a); sep((cow - a) / 2,a); } else return 0; } int main() { int n,a; cin>>n>>a; sep(n,a); cout<<nog<<endl; return 0; } ``` 求助
by 白鸽飞呀飞 @ 2020-10-30 23:18:31


|