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
Find the row with max ones
krack
Identifying polimorphic types without using RTTI or type mappings
Best time to buy and sell stocks
PointSum
cppPyClamInher
code
Two-phase sample with GCC
3SUM problem
Metodos