Skip to content

Instantly share code, notes, and snippets.

@TheoKlein
TheoKlein / ZeroJudge b758.c
Created April 23, 2016 06:14
ZeroJudge b758
#include <stdio.h>
int main() {
int H , M;
while(scanf("%d%d",&H , &M) != EOF){
H += 2;
M += 30;
if(M >= 60){
H++;
M -= 60;
@TheoKlein
TheoKlein / ZeroJudge d634.c
Created April 22, 2016 13:35
ZeroJudge d634
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct string{
char data[10];
};
typedef struct string String;
@TheoKlein
TheoKlein / ZeroJudge d583.c
Created April 22, 2016 10:17
ZeroJudge d583
#include <stdio.h>
#include <stdlib.h>
int compare(const void* , const void*);
int main() {
int n , i;
while(scanf("%d",&n) != EOF){
int input[n] , blank = 1;
for(i = 0 ; i < n ; ++i)
@TheoKlein
TheoKlein / ZeroJudge a225.c
Created April 22, 2016 10:09
ZeroJudge a225
#include <stdio.h>
#include <stdlib.h>
int compare(const void* , const void*);
int main() {
int n , i;
while(scanf("%d",&n) != EOF){
int input[n] , blank = 1;
for(i = 0 ; i < n ; ++i)
@TheoKlein
TheoKlein / ZeroJudge a915.c
Created April 22, 2016 09:58
ZeroJudge a915
#include <stdio.h>
#include <stdlib.h>
struct point{
int x;
int y;
};
typedef struct point Point;
@TheoKlein
TheoKlein / ZeroJudge c013.c
Created April 13, 2016 06:53
ZeroJudge c013
#include <stdio.h>
int main() {
int num , line = 0;
scanf("%d",&num);
while(num-- != 0){
int A , F;
scanf("%d%d",&A,&F);
int i , j , times;
for(times = 0 ; times < F ; ++times){
@TheoKlein
TheoKlein / ZeroJudge b762.c
Created April 9, 2016 13:50
ZeroJudge b762
#include <stdio.h>
#include <string.h>
int main() {
char c;
int n , kill = 0 , die = 0 , assist = 0 , combo = 0;
char Kill[] = "Get_Kill";
char Assist[] = "Get_Assist";
char Die[] = "Die";
scanf("%d%c",&n,&c);
@TheoKlein
TheoKlein / ZeroJudge a020.c
Created April 9, 2016 12:33
ZeroJudge a020
#include <stdio.h>
int main() {
int code[26] = {10, 11, 12, 13, 14, 15, 16,
17, 34, 18, 19, 20, 21, 22, 35, 23, 24, 25,
26, 27, 28, 29, 32, 30, 31, 33};
char id[10];
while(gets(id) != NULL){
int check = 0 , i , j = 8;
check += (code[id[0] - 65]) / 10 + ((code[id[0] - 65]) % 10) * 9;
@TheoKlein
TheoKlein / ZeroJudge c044.c
Last active April 9, 2016 11:32
ZeroJudge c044
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main() {
int n , i , j , max = 0;
char c;
int frequency[26] = { 0 };
scanf("%d%c",&n,&c);
while(n-- != 0){
@TheoKlein
TheoKlein / ZeroJudge a111.c
Created April 8, 2016 13:58
ZeroJudge a111
#include <stdio.h>
int main() {
int n , i;
while(scanf("%d",&n) != EOF && n != 0){
int sum = 0;
for(i = 1 ; i <= n ; ++i)
sum += i * i;
printf("%d\n",sum);
}