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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>15 puzzle with React.js</title> | |
<style> | |
table { | |
empty-cells:show; | |
} | |
.front { |
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 sys | |
if sys.version_info[0] < 3: | |
input = raw_input | |
h, w = [int(e) for e in input().split()] | |
home = [] | |
for _ in range(h): | |
home.append([0 if c == '1' else 1 for c in input().rstrip()]) | |
table = [[[c] + [0] * (h - 1) for c in line] for line in home] |
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
# -*- coding: utf-8 -*- | |
# Python 2.7.x用。 3.xで動かす場合は、raw_input()をinput()に変えればOK | |
import bisect | |
patterns = raw_input().split(' ') | |
product_num = int(patterns[0]) | |
campaign_num = int(patterns[1]) | |
product_prices = [] |
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 java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.Comparator; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.TreeMap; | |
/** |
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
// サンタクロース問題 | |
// http://karetta.jp/article/blog/oneline/030756 | |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) |