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
def custom_score(game, player): | |
"""Calculate the heuristic value of a game state from the point of view | |
of the given player. | |
Parameters | |
---------- | |
game : `isolation.Board` | |
An instance of `isolation.Board` encoding the current state of the | |
game (e.g., player locations and blocked cells). |
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.*; | |
import java.lang.*; | |
import java.io.*; | |
class GFG { | |
public static void main (String[] args) { | |
Scanner in = new Scanner (System.in); | |
int t = in.nextInt(); | |
for (int i = 0; i < t; i++) { | |
int n = in.nextInt(); |
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
public class Solution { | |
public int findKthNumber(int n, int k) { | |
int len = String.valueOf(n).length(); | |
int [] array = new int [len]; | |
array[0] = 1; | |
for (int i = 1; i < len; i++) { | |
array[i] = array[i - 1] * 10 + 1; | |
} | |
Stack<Integer> s = new Stack<>(); |
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
public class Solution { | |
public int longestValidParentheses(String s) { | |
if (s == null || s.isEmpty()) { | |
return 0; | |
} | |
Stack<Pair> stack = new Stack<>(); | |
final int n = s.length(); | |
boolean [] b = new boolean [n]; | |
for (int i = 0; i < n; i++) { |
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.*; | |
import java.util.*; | |
public class Solution { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); | |
int t = in.nextInt(); | |
for (int i = 0; i < t; i++) { | |
int n = in.nextInt(); |
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.*; | |
import java.util.*; | |
public class Solution { | |
public static void main(String[] args) throws FileNotFoundException { | |
Scanner in = new Scanner(System.in); | |
int t = in.nextInt(); | |
for (int i = 0; i < t; i++) { | |
int n = in.nextInt(); | |
int m = in.nextInt(); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="custom_rules"> | |
<xmlproperty file="AndroidManifest.xml" prefix="mymanifest" collapseAttributes="true"/> | |
<target name="-pre-compile"> | |
<copy toDir="./gen/com/com2us/golfstarworldtour/normal/freefull/google/global/android/common/" overwrite="true"> | |
<fileset file="./unity_gen_r/golfstar/R.java" /> | |
</copy> | |
<copy toDir="./gen/com/com2us/peppermint/" overwrite="true"> | |
<fileset file="./unity_gen_r/peppermint/R.java" /> | |
</copy> |