Skip to content

Instantly share code, notes, and snippets.

@fferegrino
Created March 18, 2014 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fferegrino/9632381 to your computer and use it in GitHub Desktop.
Save fferegrino/9632381 to your computer and use it in GitHub Desktop.
2525 - Dangerous Dive
#include <stdio.h>
#define m 1001
short c[m];
int main(){
int N, R, n, t;
while(scanf("%d%d",&N,&R) != EOF){
R++;
t = 0;
while(--R){
scanf("%d", &n);
c[n] = 1;
}
for(R = 1; R < N+1; R++){
if(c[R] == 0){
printf("%d ", R);
t++;
}
c[R] = 0;
}
if(t == 0)
printf("*");
printf("\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment