Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;
int main() {
string input;
while(cin >> input){
if(input == "0")
#include <iostream>
#include <string>
using namespace std;
int main() {
string input1 , input2;
while(cin >> input1 >> input2){
int num1[10] = {0}, num2[10] = {0}, count = 0;
if(input1 == "0" && input2 == "0")
@TheoKlein
TheoKlein / ZeroJudge d392.c
Created May 15, 2016 03:24
ZeroJudge d392
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main() {
char input[100000];
while(gets(input) != NULL){
long int sum = 0;
char *ptr;
ptr = strtok(input , " ");
#include <iostream>
#include <cmath>
#include <string>
#define DIGIT 10000
using namespace std;
class HugeInteger
{
public:
#include <iostream>
#include <cmath>
#include <string>
#define DIGIT 500
using namespace std;
class HugeInteger
{
public:
@TheoKlein
TheoKlein / ZeroJudge d255.c
Created May 7, 2016 03:50
ZeroJudge d255
#include <stdio.h>
int GCD(int , int);
int main() {
int num;
while(scanf("%d", &num) != EOF){
if(num == 0)
break;
int G = 0 , i , j;
@TheoKlein
TheoKlein / ZeroJudge a130.c
Created May 7, 2016 03:39
ZeroJudge a130
#include <stdio.h>
int main() {
int num , i , j;
scanf("%d",&num);
for(i = 1 ; i <= num ; ++i){
char url[10][105];
int relation[10][1] , max = 0;
for(j = 0 ; j < 10 ; ++j){
scanf("%s%d",url[j] , relation[j]);
@TheoKlein
TheoKlein / ZeroJudge b367.c
Created April 29, 2016 09:56
ZeroJudge b367
#include <stdio.h>
int main() {
int num , k;
while(scanf("%d",&num) != EOF){
for(k = 0 ; k < num ; ++k){
int a , b , i , check = 0;
scanf("%d%d",&a ,&b);
int array[a * b];
for(i = 0 ; i < a * b ; ++i)
@TheoKlein
TheoKlein / ZeroJudge a224.c
Created April 29, 2016 09:41
ZeroJudge a224
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main() {
char input[1005];
while(gets(input) != NULL){
int i , check = 0;
int count[123] = {0};
for(i = 0 ; i < strlen(input) ; ++i){
@TheoKlein
TheoKlein / ZeroJudge d985.c
Created April 23, 2016 07:16
ZeroJudge d985
#include <stdio.h>
#include <stdlib.h>
struct data{
int minutes;
int seconds;
};
typedef struct data Data;