![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM-分类-数学
friendgic
这个作者很懒,什么都没留下…
展开
-
Zoj 2388
#include #include using namespace std; int main(){ int a,b,N; cin>>N while(N--){ cin>>a>>b; if(b>a || (a-b)%2==1){ cout<<"impossible"<<endl; continue; } cout<<(a+b)/2<<" "<<(a-原创 2012-08-10 17:29:02 · 243 阅读 · 0 评论 -
Zoj 2857
求平均的简单应用 #include #include using namespace std; class color{ public: int r,g,b; void show(){ cout<<(r+g+b)/3; } }; int main(){ int n,m,i,j,al=1; color co[110][110]; while(cin>>n>>m){原创 2012-08-14 10:51:56 · 340 阅读 · 0 评论 -
Zoj 2892
正向顺序是 5, 2, 3, 2, 5, 7, 9, 6 7, 5, 12, 15, 3, 1, -2, 3 12,27,2,-3, 3, 1, -2, 3 39,-5,2,-3, 3, 1, -2, 3 那么递推回去的公式应该是 for i=1 to n (i*=2) do b[2*k] do b[2*k+1]原创 2012-08-15 15:43:59 · 157 阅读 · 0 评论