# Niu Ke

## [JZ36 Binary Search Tree and Doubly Linked List]

Hits: 0describe Input a [binary search tree] , convert the binary search tree into a sorted doubly linked list. As shown below Data range: the number of nodes in the input [binary tree 0 ≤ n ≤ 1000, the value of each node in the binary tree 0 ≤ val ≤ 1000] Requirements: [space complexity] …

## Question 100B of Niu Ke Practice Competition;

Hits: 0 Login—Professional IT Written Test Interview Preparation Platform_Nioke.com [100 Problem Solving in Niu Ke Practice Competition] #include<bits/stdc++.h> using namespace std; using ll=long long; const int N=2e5+10; ll n,a[N],col[N]; ll dp; int main() { ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); cin>>n; for (int i=1; i<=n; ++i) cin>>a[i]; for (int i=1; i<=n; ++i) { char x; cin>>x; col[i]=(x=='R'?1:0); } for ( …

## 40_AC_Code_Records

Hits: 0Niu Ke Xiaobai Yue Contest 40_ACM/NOI/CSP/CCPC/ICPC algorithm programming difficult practice match_ Niu Ke Contest OJ A numbers game #include <cstdio> using namespace std; const int N = 32; int x; int n; int main() { scanf("%d", &n); while (n — ) { scanf("%d", &x); int res = 0, flag = x % 2; while(x) …