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.OutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.PrintWriter; | |
import java.util.Arrays; | |
import java.util.InputMismatchException; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.io.InputStream; |
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.OutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.PrintWriter; | |
import java.util.Arrays; | |
import java.util.StringTokenizer; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.io.InputStream; |
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.*; | |
import java.util.*; | |
import java.util.stream.Collectors; | |
public class Bachet { | |
public static void main(String args[]) throws Exception { | |
BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); | |
PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)); | |
String line; |
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
static class FruitBasket { | |
public void solve(int testNumber, FastReader in, PrintWriter out) { | |
int n = in.nextInt(); | |
int[] fruits = new int[n]; | |
for (int i = 0; i < n; i++) | |
fruits[i] = in.nextInt(); | |
Arrays.sort(fruits); | |
long sum = 0L; | |
long cur = 0; | |
for (int i = 0; i < n; i++) cur += fruits[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.io.OutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.PrintWriter; | |
import java.io.InputStreamReader; | |
import java.math.BigDecimal; | |
import java.util.StringTokenizer; | |
import java.io.BufferedReader; | |
import java.io.InputStream; |
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.OutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.PrintWriter; | |
import java.util.StringTokenizer; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.io.InputStream; |
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 random | |
def exercice_6(n, m): | |
arr = [i for i in range(1, n + 1)] | |
res = [] | |
for i in range(m) : | |
random.shuffle(arr) | |
res.append(arr) | |
return res |
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; | |
/** | |
* @author Mehdi Maick | |
*/ | |
public class Main { | |
static int var = 0; |
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 { Injectable } from '@angular/core'; | |
import { Observable } from "rxjs/Observable"; | |
declare var google: any; // globale declaration of the google namespace | |
@Injectable() | |
export class FindService { | |
public distance(start: string, end: string): Observable<any> { | |
/* instance of the direction service */ |
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
@decorator(param=1) | |
def f(x): | |
""" Syntax Highlighting Demo | |
@param x Parameter""" | |
s = ("Test", 2+3, {'a': 'b'}, x) # Comment | |
print s[0].lower() | |
class Foo: | |
def __init__(self): | |
byte_string = 'newline:\n also newline:\x0a' |