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.ArrayList; | |
import java.util.Collections; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.PriorityQueue; | |
import java.util.Queue; | |
import java.util.Scanner; | |
import java.util.Set; | |
public class PacmanAStar { |
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.ArrayList; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
public class Main { | |
public static void main(String[] args) { | |
// Assumptions: |
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
int C2(String s) { | |
s = s.replace(" ", ""); | |
String t = s.replaceAll("[0-9x^&|~()]", ""); | |
if(!t.isEmpty()) { | |
return -1; | |
} | |
for (int i = 1; i <= 1000; i++) { |
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.Random; | |
public class Driver { | |
public static void main(String[] args) throws InterruptedException { | |
Random r = new Random(); | |
Programme p = new Programme(); | |
long startTime = System.currentTimeMillis(); |
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
// Nanadio code sady nanampy commentaire dia niresubmit dia lasa 2eme place :D | |
// Efa tapitra ny lalao vao ni-resubmit aho an!! | |
static int closest; | |
static int closestAbs; | |
static int target; | |
static int arrLen; | |
static int[] nums; | |
// Ny approche brute force dia manao ny combinaison ana somme rehetra anatin'ilay array |
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.Arrays; | |
public class TzWccS3BalsColor { | |
public static void main(String[] args) { | |
// Visible tests | |
char[][] board = new char[][] { | |
{ 'B', 'B', 'G', 'O' }, | |
{ 'R', 'B', 'B', 'O' }, | |
{ 'Y', 'O', 'G', 'Y' } |
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.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
public class WCC24 { | |
public static void main(String[] args) { |