Compile Error
foo.c:1:9: fatal error: Stdio.h: No such file or directory 1 | #include<Stdio.h> | ^~~~~~~~~ compilation terminated.
Code
#include<Stdio.h>
int main()
{
int N, K;
char a[999];
scanf("%d%d", &N, &K);
for(int i=0; i<N; i++)
{
scanf(" %c", &a[i]);
}
for(int i=0; i<N; i=i+K)
{
for(int i=0; i<N-1; i++)
{
for(int j=0; j<N-i-1; j++)
{
char temp=a[j];
a[j]=a[j+1];
a[j+i]=temp;
}
}
}
for(int i=0; i<N; i++)
{
printf("%c", a[i]);
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1230 Lexicographically Smallest Rearrangement
- Contest
- LUCC Presents Kick & Code Intra LU Programming Contest
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2025-09-01 07:02:22
- Judged At
- 2025-09-01 07:02:22
- Judged By
- Score
- 0
- Total Time
- 0ms
- Peak Memory
- 0 Bytes