This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void func1(int n,int from, int to,int work,FILE *fq){ | |
if (n>0) { | |
func1(n-1,from,work,to,fq); | |
fprintf(fq,"%d %d %d\n",n, from, to ); | |
func1(n-1,work,to,from,fq); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int list[k]; | |
for ( b = 0; b < k; b++) { | |
list[b] = 0; | |
} | |
int alive = k; | |
int check = -1; | |
while (alive !=0) { | |
for (c = 0; c < l; c++) { | |
do { | |
check++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
func jyou(n : Double, x:Int) -> Double { | |
var ans = 1.0 | |
for _ in 1...x{ | |
ans *= n | |
} | |
return ans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
//:累乗をするための関数を定義する | |
func jyou(n : Double, x:Int) -> Double { | |
var ans = 1.0 | |
for _ in 1...x{ | |
ans *= n | |
} | |
return ans | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cashe :Dictionary<String, Int> = [:] | |
func search (list: [[Int]], i:Int, j:Int) -> Int { | |
if cashe["\(i):\(j)"] != nil { | |
return cashe["\(i):\(j)"]! | |
} | |
if i > 14{ | |
return 0 | |
} | |
else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
let array = ["ズン", "ドコ"] | |
var zun = 0 | |
while true { | |
let a = Int(arc4random_uniform(2)) | |
print(array[a]) | |
if a == 0 { | |
zun += 1 | |
} | |
else if a == 1 && zun == 4 { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer