From 7206ecee7579a10dd347d06b397b3790e969f8f3 Mon Sep 17 00:00:00 2001 From: Raphael McSinyx Date: Sun, 1 Jan 2017 21:05:53 +0700 Subject: Add others/easy20160714 --- others/easy20160714/13.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 others/easy20160714/13.c (limited to 'others/easy20160714/13.c') diff --git a/others/easy20160714/13.c b/others/easy20160714/13.c new file mode 100644 index 0000000..c95fa7c --- /dev/null +++ b/others/easy20160714/13.c @@ -0,0 +1,21 @@ +#include + +int main() +{ + FILE *fi = fopen("INP.TXT", "r"), *fo = fopen("OUT.TXT", "w"); + short n, i, a, b[10000] = {}; + char m; + + fscanf(fi, "%hd %hhd", &n, &m); + + for (i = 0; i < n; i++) { + fscanf(fi, "%hd", &a); + fprintf(fo, "%hd ", ++b[a - 1]); + } + + fputc(10, fo); + + fcloseall(); + + return 0; +} -- cgit 1.4.1