View deDup.java
// 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) { |
View design.js
function makeGrid() { | |
console.log("makeGrid is running!") | |
// Select size input | |
let canvas, cell, gridHeight, gridWidth, rows; | |
canvas = $('#pixelCanvas'); | |
gridHeight = $('#inputHeight').val(); | |
gridWidth = $('#inputWidth').val(); |
View style.css
body { | |
text-align: center; | |
background-size: cover; | |
background-repeat: no-repeat; | |
background-position: center; | |
} | |
h2 { | |
margin: 1em 0 0.25em; |
View index.html
<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> |
View UVA127.java
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)); |
View UVA11804.java
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()); |
View UVA12747.java
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]; |
View UVA11608
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; |
View UVA12918.java
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; |
View UVA12996.java
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