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
// Given an array of integers, remove all of the duplicates | |
int[] deDup(int[] a) { | |
Set<Integer> set = new LinkedHashSet<>(); | |
for(int x : a) { | |
set.add(x); | |
} | |
int [] ret = new int[set.size()]; | |
int i =0; | |
for(int x : set) { |
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
function makeGrid() { | |
console.log("makeGrid is running!") | |
// Select size input | |
let canvas, cell, gridHeight, gridWidth, rows; | |
canvas = $('#pixelCanvas'); | |
gridHeight = $('#inputHeight').val(); | |
gridWidth = $('#inputWidth').val(); |
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
body { | |
text-align: center; | |
background-size: cover; | |
background-repeat: no-repeat; | |
background-position: center; | |
} | |
h2 { | |
margin: 1em 0 0.25em; |
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
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<body background="http://res.cloudinary.com/dxuvuvh7s/image/upload/v1526680568/abstract-art-artistic-459799.jpg" | |
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Monoton"> | |
<link rel="stylesheet" href="styles.css"> | |
<script src="http://res.cloudinary.com/dxuvuvh7s/image/upload/v1524020589/Pixel_Art_Maker_4.png"></script> | |
<meta charset="UTF-8"> | |
</head> | |
<body> |
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.List; | |
import java.util.Stack; | |
public class UVA127 { | |
public static void main(String[] args) throws IOException { | |
BufferedReader sc = new BufferedReader(new InputStreamReader(System.in)); |
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.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.PriorityQueue; | |
import java.util.Scanner; | |
public class UVA11804 { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int T = Integer.parseInt(sc.nextLine()); |
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.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int T = sc.nextInt(); | |
for(int t = 1; t <= T; t++) { | |
int N = sc.nextInt(); | |
int [] A = new int[N]; | |
int [] B = new int[N]; |
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.util.Scanner; | |
public class UVA11608 { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int c = 1; | |
while(sc.hasNextInt()) { | |
int p = sc.nextInt(); | |
if( p == -1) { | |
break; |
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.util.Scanner; | |
public class UVA12918 { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int T = sc.nextInt(); | |
while(T-->0) { | |
int n = sc.nextInt(); | |
int m = sc.nextInt(); | |
int extra = m - n; |
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.util.Scanner; | |
public class UVA12996 { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
int T = sc.nextInt(); | |
for(int t =1;t<=T;t++) { | |
int N = sc.nextInt(); | |
int L = sc.nextInt(); | |
int [] M = new int[N]; |
NewerOlder