Compile Error
foo.cs(2,0): error CS1024: Wrong preprocessor directive foo.cs(2,0): error CS1525: Unexpected symbol `int'
Code
#include<stdio.h>
int main()
{
int x, y[999], z=0;
scanf("%d", &x);
for(int i=0; i<x; i++)
{
scanf("%d", &y[i]);
}
for(int i=0; i<x-1; i++)
{
for(int j=0; j<x-i-1; j++)
{
if(y[j]>y[j+1])
{
int temp=y[j];
y[j]=y[j+1];
y[j+1]=temp;
}
}
}
for(int i=0; i<x; i++)
{
if(y[i]+1==y[i+1])
{
z++;
}
}
if(z==x-1)
{
printf("YES");
}
else
{
printf("NO");
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1229 Array of Beauty
- Contest
- LUCC Presents Kick & Code Intra LU Programming Contest
- Language
- C# 7 (Mono 6.8)
- Submit At
- 2025-09-01 05:56:00
- Judged At
- 2025-09-01 05:56:00
- Judged By
- Score
- 0
- Total Time
- 0ms
- Peak Memory
- 0 Bytes