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
congruence modulo equations (together with a simple BigInteger class)
11933
read_write_lock_acc
Scope guarding
samp error
DayTempEnum
ExtremeValues
aaaaaaaaaaaa
multi bitmap
Display all prime numbers upto N without sieve