Skip to content

Instantly share code, notes, and snippets.

View kunishi's full-sized avatar

Takeo Kunishima kunishi

View GitHub Profile
/* @JUDGE_ID: 26089BN 112 C "" */
#include <stdio.h>
#include <stdlib.h>
#define TRUE 1
#define FALSE 0
#define NULLNODE 2
char c;
/* @JUDGE_ID: 26089BN 106 C "" */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int gcd(int i, int j) {
int r;
while (j != 0) {
r = i % j;
/* @JUDGE_ID: 26089BN 105 C "" */
#include <stdio.h>
#include <stdlib.h>
#define MAX 10000
int main() {
int height[MAX];
int i;
int from, to, h;
/* @JUDGE_ID: 26089BN 100 C "" */
#include <stdio.h>
#include <stdlib.h>
#define MAX 1000000
#define UNDEF -1
int table[MAX+1];
int collatz(int x)
@kunishi
kunishi / TestDialogFragment.java
Created March 16, 2015 08:01
TestDialogFragment.java, fix version.
package com.example.time_circle;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@kunishi
kunishi / build.gradle
Created March 13, 2015 06:42
build.grade under time_circle.
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.time_circle"
minSdkVersion 17
targetSdkVersion 17
@kunishi
kunishi / build.gradle
Created March 13, 2015 06:40
build.gradle on top of the project.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
}
}
upstream app {
server unix:/usr/local/nginx/html/apps/service/shared/tmp/sockets/unicorn.app.sock fail_timeout=0;
}
server {
listen 80;
server_name service.dbsj.org;
client_max_body_size 4G;
root /usr/local/nginx/html/apps/service/current/public;
size(480, 120);
rect(160, 30, 260, 20);
ellipse(140, 0, 190, 190);
size(200, 200);
colorMode(HSB, 100);
background(99);
noStroke();
int i;
for (i = 0; i <= 3; i = i + 1) {
fill(45, 80 - 20 * i, 99);
rect(0, 0, 200 - 50 * i, 200 - 50 * i);
}