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.ArrayDeque; | |
import java.util.Arrays; | |
import java.util.Deque; | |
import java.util.Scanner; | |
public class Main { | |
public static int[][] maze =new int [100][]; | |
public static int[][] dist =new int [100][]; | |
public static int[][] dir ={{-1,0},{1,0},{0,-1},{0,1}}; | |
public static void main(String[] args) { |
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.io.IOException; | |
import java.io.InputStream; | |
import java.util.Arrays; | |
import java.util.NoSuchElementException; | |
public class Main { | |
static FastScanner sc=new FastScanner(); | |
static int INF=Integer.MAX_VALUE/2-1; | |
static int src,dest,N,M,ai,bi,ti; | |
static long[][] dist; |
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.List; | |
import java.util.Scanner; | |
public class Main { | |
public static String S; | |
public static void main(String[] args) { | |
Scanner sc=new Scanner(System.in); | |
S=sc.nextLine(); |
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; | |
import java.util.Scanner; | |
public class Main { | |
public static long happiness[][]=new long[2501][2501]; | |
public static int center=1250; | |
public static String S; | |
public static void main(String[] args) { | |
Scanner sc=new Scanner(System.in); | |
S=sc.nextLine(); |
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.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner sc=new Scanner(System.in); | |
long N=sc.nextLong(); | |
long depth=0; | |
long tmp=N; | |
while(tmp>1){ |
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.Scanner; | |
public class Main { | |
public static int[][] maze =new int [100][]; | |
public static int[][] dist =new int [100][]; | |
public static int[][] dir ={{-1,0},{1,0},{0,-1},{0,1}}; | |
public static void main(String[] args) { | |
Scanner sc=new Scanner(System.in); | |
double N=sc.nextDouble(); | |
double K=sc.nextDouble(); |
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.List; | |
import java.util.Scanner; | |
public class Main { | |
public static int[][] maze =new int [100][]; | |
public static int[][] dist =new int [100][]; | |
public static int[][] dir ={{-1,0},{1,0},{0,-1},{0,1}}; | |
public static void main(String[] args) { |
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
#include <bits/stdc++.h> | |
#include <X11/Intrinsic.h> | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
#define all(c) ((c).begin()), ((c).end()) | |
#define dump(c) cerr << "> " << #c << " = " << (c) << endl; | |
#define iter(c) __typeof((c).begin()) |
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
#include <bits/stdc++.h> | |
#include <X11/Intrinsic.h> | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
#define all(c) ((c).begin()), ((c).end()) | |
#define dump(c) cerr << "> " << #c << " = " << (c) << endl; | |
#define iter(c) __typeof((c).begin()) |
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
#include <iostream> | |
#include <string> | |
using namespace std; | |
void outputRec(int n, string str){ | |
if (n == 0){ | |
cout << str << endl; | |
return; | |
} | |
outputRec(n - 1, str+"a"); | |
outputRec(n - 1, str+"b"); |