This file contains hidden or 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
| class Matrix < Array | |
| def initialize(filename) | |
| # read file | |
| f = File.open(filename) or die("no such file or reading error.") | |
| @row, @col = f.readline.split(' ').map(&:to_i) | |
| f.each_line { |line| | |
| line = line.split(' ').map(&:to_r) | |
| self.push(line) | |
| } | |
| end |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <string.h> | |
| void swap(char* a, char* b) { | |
| char t = *a; | |
| *a = *b; | |
| *b = t; | |
| } | |
| void perm(char* head, int i, int n) { |
This file contains hidden or 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
| ["1", "2"] |
This file contains hidden or 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 org.newdawn.slick.AppGameContainer; | |
| import org.newdawn.slick.GameContainer; | |
| import org.newdawn.slick.SlickException; | |
| import org.newdawn.slick.state.StateBasedGame; | |
| public class Main extends StateBasedGame | |
| { | |
| public Main(String name) { | |
| super(name); | |
| } |
This file contains hidden or 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.util.logging.Level; | |
| import java.util.logging.Logger; | |
| import org.newdawn.slick.AppGameContainer; | |
| import org.newdawn.slick.BasicGame; | |
| import org.newdawn.slick.GameContainer; | |
| import org.newdawn.slick.Graphics; | |
| import org.newdawn.slick.SlickException; | |
| public class MyGame extends BasicGame |
NewerOlder