Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

babaslavkavelikata's blog

By babaslavkavelikata, history, 9 years ago, In English

include

using namespace std; void hanoi(int n,int A,int C,int B) { if (n==1) { cout<<n<<" "<<A<<" "<<C<<endl; } else { hanoi(n-1,A,B,C); cout<<n<<" "<<A<<" "<<C<<endl; hanoi(n-1,B,C,A); }

} int main() { int n; cin>>n; hanoi(n,1,3,2); return 0; }

Full text and comments »

By babaslavkavelikata, history, 9 years ago, In English

include

include

using namespace std; int main() { int a,b; scanf("%d%d",&a,&b); std::cout<<a+b<<"\n"; }

Full text and comments »

By babaslavkavelikata, history, 9 years ago, In English
By babaslavkavelikata, history, 9 years ago, In English
By babaslavkavelikata, history, 9 years ago, In English

If a is 2 and b is 2 so c is 4.

Full text and comments »