Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
2021, M2, Simulare;S3: 2
#include <iostream> using namespace std; int main() { int n,k; cin>>n>>k; int v[n]; for(int i = 0; i < n; i ++) { cin>>v[i]; } int x = v[k]; for( int i = k; i > 0; i--) { v[i] = v[i - 1]; } v[0] = x; for(int i = 0; i < n; i ++) { cout<<v[i]<<" "; } }
run
|
edit
|
history
|
help
0
DayTempEnum
HI
CutRod(BottomUp)
32535
Test 5(2020)
Question 1
abraham
Get all anagrams from given words
DeepaC++
scemo le