MinGWでIUPを使うときに渡すオプション
gcc sample.c -o sample -liup - mwindows -lole32 -lcomctl32 -luuid
module Main where | |
{-# LANGUAGE OverloadedStrings #-} | |
import System.IO | |
import Control.Monad.IO.Class (liftIO) | |
import Codec.Binary.UTF8.String (encode) | |
import Data.ByteString | |
import Data.Conduit | |
import qualified Data.Conduit.Binary as CB |
// obj.toString() | |
str = obj+""; |
#スコープの関係でグローバル変数 | |
$msg = "Hello, Before World!" | |
def say(str = $msg) | |
puts str | |
end | |
say #=> Hello, Before World! | |
$msg = "Hello, After World!" |
(function(exports) { | |
"use strict"; | |
/** | |
* arr["1..3"]かarr["1,2,3"]という形式かを判断する | |
* @private | |
*/ | |
function sliceInfo(str) { | |
var |
var | |
arr = [0,1,2,3,4,5,6,7,8,9], //元となる配列 | |
sli = toSlicer(arr); //配列を拡張 | |
// 範囲代入と取得 | |
sli["1..3"] = [10,11,12]; | |
console.log(sli["0..2"]); //=>0,10,11 | |
//複数代入と取得 | |
sli["4,6,8"] = [13,14,15]; |
MinGWでIUPを使うときに渡すオプション
gcc sample.c -o sample -liup - mwindows -lole32 -lcomctl32 -luuid
import java.util.Comparator; | |
import java.util.PriorityQueue; | |
import java.util.Scanner; | |
class Main { | |
public static void main(String[] args) { | |
Scanner scan = new Scanner(System.in); | |
final int N = scan.nextInt(); |
var | |
input = ''; | |
process.stdin.resume(); | |
process.stdin.setEncoding('utf8'); | |
process.stdin.on('data', function(chunk) { | |
input += chunk; | |
}); | |
process.stdin.on('end', function() { | |
input = input.split('\n'); |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Scanner; | |
public class Main { | |
/** | |
* @param args |
function main() { | |
function dfs(n,l,r){ | |
if(n.length === 0) return true; | |
return (n[0] > l[0] && dfs(n.slice(1), [n[0]].concat(l), r)) || | |
(n[0] > r[0] && dfs(n.slice(1), l, [n[0]].concat(r))); | |
} | |
var | |
i, | |
n = parseInt(input[0], 10), | |
nums = input.slice(1); |