Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding template

  • Loading branch information...
commit e05d89c4f193c2c55ffe4dba3ad02c48e27ca333 1 parent 13d577b
Kai Wang authored
Showing with 32 additions and 0 deletions.
  1. +32 −0 template/template.c
View
32 template/template.c
@@ -0,0 +1,32 @@
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void solution(File *f)
+{
+ // parse the input
+
+ // work
+}
+
+int main(int argc, char *argv[])
+{
+ FILE *f;
+ char c;
+
+ if (argc != 2) {
+ printf("Usage:\n");
+ printf(" %s filename\n", argv[0]);
+ exit(EXIT_FAILURE);
+ }
+
+ f = fopen(argv[1], "r");
+ if (!f) {
+ perror(NULL);
+ exit(EXIT_FAILURE);
+ }
+
+ solution(f);
+
+ exit(EXIT_SUCCESS);
+}
Please sign in to comment.
Something went wrong with that request. Please try again.