D. Walk on Matrix

构造题

题意:题目中给出一种类似于(走下去)这道题的代码去算&运算,可想而知是错误的

 1 #include<bits/stdc++.h>
 2 using namespace std;
 3 typedef long long ll;
 4 int main() {
 5     int n;
 6     cin>>n;
 7     if(n==0){
 8         cout<<"1 1"<<'\n';
 9         cout<<"1"<<'\n';;
10     }
11     else{
12         int tmp=1;
13         while(tmp<=n)
14             tmp<<=1;
15         cout<<"2 3"<<'\n';
16         cout<<tmp+n<<" "<<n<<" "<<0<<'\n';
17         cout<<tmp<<" "<<tmp+n<<" "<<n<<'\n';
18     }
19     return 0;
20 }
View Code

 

posted @ 2020-04-01 11:17  古比  阅读(287)  评论(0编辑  收藏  举报