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 math | |
| from math import cos, sin | |
| #### DEFINE THE mass, length and gravitational constant ##### | |
| #playing around with the gravity constant and mass ratios might cause a resonant system, which is pretty cool | |
| m1,m2 = 2,1 | |
| L1,L2 = 1,2 | |
| g = 9.81 | |
| ######## |
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
| def parse_command(): | |
| from sys import stdin as f | |
| n_tests = int(f.readline().strip()) | |
| test_num = 0 | |
| while test_num < n_tests: | |
| n_cities = int(f.readline().strip()) | |
| cities = [int(x) for x in f.readline().strip().split()] | |
| W = [] | |
| for _ in range(n_cities): | |
| line = [float("inf") if int(x) == -1 else int(x) for x in f.readline().strip().split()] |
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
| def parse_command(): | |
| from sys import stdin as f | |
| n_tests = int(f.readline().strip()) | |
| test_num = 0 | |
| while test_num < n_tests: | |
| n_cities = int(f.readline().strip()) | |
| cities = [int(x) for x in f.readline().strip().split()] | |
| W = [] | |
| for _ in range(n_cities): | |
| line = [float("inf") if int(x) == -1 else int(x) for x in f.readline().strip().split()] |
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
| from sys import stdin, stderr | |
| import traceback | |
| adj_mx = [[0,1,1,0,0,0],[0,0,0,1,0,0],[0,0,0,1,1,0],[0,0,0,0,0,1],[0,1,0,1,0,1],[0,0,0,1,0,0]] | |
| class Node(): | |
| def __init__(self, num): | |
| self.points_to = [] | |
| self.num = num | |
| self.d = 0 |
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
| from sys import stdin, stderr | |
| import traceback | |
| adj_mx = [[0,1,1,0,0,0],[0,0,0,1,0,0],[0,0,0,1,1,0],[0,0,0,0,0,1],[0,1,0,1,0,1],[0,0,0,1,0,0]] | |
| class Node(): | |
| def __init__(self, num): | |
| self.points_to = [] | |
| self.num = num | |
| self.d = 0 |
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
| package oving5.person; | |
| import java.util.Iterator; | |
| import java.util.function.BinaryOperator; | |
| import java.lang.Double; | |
| public class BinaryComputingIterator implements Iterator<Double>{ | |
| private Iterator<Double> firstIterator; | |
| private Iterator<Double> secondIterator; | |
| private BinaryOperator<Double> binaryOperator; |
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
| void run () throws NumberFormatException{ | |
| Scanner scan = new Scanner(System.in); | |
| scan.useDelimiter("[0-9]+"); | |
| while ( true ) { | |
| try { | |
| String inputLine = scan.nextLine(); | |
| int parseInt = Integer.parseInt(inputLine); | |
| System.out.println("input was: " + Integer.toString(parseInt)); | |
| } catch (NumberFormatException e) { | |
| System.out.println( e.toString() ); |
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
| package oving8.highscore; | |
| import java.util.List; | |
| import java.util.ArrayList; | |
| import oving8.highscore.HighscoreListener; | |
| import oving8.highscore.HighscoreListListener; | |
| public class HighscoreList { | |
| private int maxSize; |
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
| package oving7.sudoku; | |
| import java.util.Scanner; | |
| import java.util.Random; | |
| import java.util.Stack; | |
| import java.io.File; | |
| import java.io.FileNotFoundException; | |
| import java.io.PrintWriter; | |
| import java.util.ArrayList; | |
| import oving7.sudoku.Board; |
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
| package chess; | |
| import chess.ChessPiece; | |
| import chess.Color; | |
| import chess.PiecePosition; | |
| import java.util.Scanner; | |
| public class GameEnginge { | |
| static CheckBoard chessBoard = new CheckBoard(); | |
| GameEnginge () { |