Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
suffle array
#include <bits/stdc++.h> using namespace std; int main() { int n; //cout<<"Enter the size: "<<endl; cin>>n; int i;int nums[2*n]; for(i=0;i<2*n;i++) {cin>>nums[i];} int p1=0,p2=n, reasult[2*n]={}; for(i=0;i<2*n;i++) { if(i%2==0){reasult[i]=nums[p1++];} else {reasult[i]=nums[p2++];} cout<<reasult[i]<<endl; } return 0; }
run
|
edit
|
history
|
help
1
Beadandó
BinTree playground
Example Iterator Increment
Queue with Limited Size of Arrays
ThreadPool
maximum_frequent_sum
First and last Occurence of an Element
cccc
is_sorted_30-Seconds-of-C++
Średnia bez zera