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
FROM alpine:3.9 as builder | |
RUN apk add --update --no-cache git nodejs-dev npm | |
RUN git clone https://github.com/fbsamples/Canvas-Streaming-Example.git && cd Canvas-Streaming-Example && npm install | |
FROM alpine:3.9 as runner | |
RUN apk add --update --no-cache nodejs ffmpeg | |
COPY --from=builder Canvas-Streaming-Example/server.js server.js | |
COPY --from=builder Canvas-Streaming-Example/node_modules node_modules | |
EXPOSE 3000 | |
ENTRYPOINT node server.js |
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.Arrays; | |
import java.util.Scanner; | |
public class Main { | |
public static final int MOD = 1_000_000_007; | |
public static void main(final String... args) { | |
final Scanner sc = new Scanner(System.in); | |
main: | |
while (sc.hasNext()) { |
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(final String... args) { | |
final Scanner sc = new Scanner(System.in); | |
main: | |
while (sc.hasNext()) { | |
final int n = sc.nextInt(); | |
if (n == 0) | |
return; |
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.HashSet; | |
import java.util.Scanner; | |
import java.util.Set; | |
public class Main { | |
public static void main(final String... args) { | |
final Scanner sc = new Scanner(System.in); | |
main: | |
while (sc.hasNext()) { | |
final int n = sc.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.util.*; | |
public class Main { | |
public static void main(String... args) { | |
final Scanner sc = new Scanner(System.in); | |
// input | |
final int N = sc.nextInt(); | |
final boolean[][] m = new boolean[N][N]; | |
for (int i = 0; i < N; i++) | |
for (int j = 0; j < N; j++) |
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.*; | |
public class Main { | |
private static final int[] dx = new int[128]; | |
private static final int[] dy = new int[128]; | |
private static final int[] dx2 = {0, 0, 1, -1}; | |
private static final int[] dy2 = {-1, 1, 0, 0}; | |
static { |
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 static java.util.Arrays.*; | |
public class Main { | |
public static void main(String... args) { | |
new Main().run(); | |
} | |
static final long MOD = 1000 * 1000 * 1000 + 7; | |
public void run() { |
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 static java.lang.Math.*; | |
import static java.lang.Integer.*; | |
public class Main { | |
public static void main(String... args) { | |
new Main().run(); | |
} | |
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.*; | |
import static java.lang.Math.*; | |
import static java.util.Arrays.*; | |
public class Main { | |
public static void main(String... args) { | |
new Main().run(); | |
} |
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 static java.lang.Math.*; | |
import static java.util.Arrays.*; | |
public class Main { | |
public static void main(String... args) { | |
new Main().run(); | |
} | |
public void run() { |
NewerOlder