Skip to content

Instantly share code, notes, and snippets.

import java.util.*;
import java.io.*;
public class K {
public static void main(String[] args) throws Exception {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer line = new StringTokenizer(input.readLine());
int b = Integer.parseInt(line.nextToken());
int n = Integer.parseInt(line.nextToken());
int e = Integer.parseInt(line.nextToken());
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
scanf("%d%d", &a, &b);
if (a == 0 && b == 0) {
printf("Not a moose\n");
} else if (a == b) {
@ewmson
ewmson / I.py
Created October 23, 2017 20:19
n = int(raw_input())
adj = {}
files = raw_input().split()
for file in files:
adj[file] = set()
for _ in xrange(n):
name, k = raw_input().split()
k = int(k)
for _ in xrange(k):
line = raw_input()
#include <bits/stdc++.h>
#include <set>
using namespace std;
typedef long long ll;
struct Team {
int num;
int probs;
ll penalty;
x = raw_input()
result = eval(x)
res = str(result)
print('++>')
print('+++>')
print('[<+>-]<')
z = 2
for c in res:
print(((255 + (ord(c) - z))*'+') + '.')
import java.util.*;
/**
* Created by Eric on 1/26/2017.
*/
public class Problem {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
import java.util.*;
import java.util.stream.IntStream;
public class BlackVienna {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
TwoSAT solver = new TwoSAT(2 * 26);
for (int i = 0; i < N; i++) {
import heapq
T = int(input())
for _ in range(T):
N = int(input())
canv = list(sorted(map(int,input().split())))
heapq.heapify(canv)
amount = 0
while len(canv) != 1:
val = heapq.heappop(canv) + heapq.heappop(canv)
s = '00000000020000300005000070000b0000d0000j0000n0000t0000x000170001b0001n0001t00021000290002p0002v0003d0003l0003x000470004t000510005l0005x0006f0006r0007j0007r0008l000910009l000a1000ap000b1000c1000cj000d7000dn000er000f3000g9000gt000hh000i3000jd000jt000kz000lj000mf000n3000oj000p1000q5000qt000rt000sl000u7000un000wb000x5000y5000z10010d0010x0012r0013n0014v0015j0017h00185001a5001b5001c9001d9001ex001fl001hr001in001k5001l9001nj001o7001pz001r5001sp001tt001w9001wx001yx002050021t00233002530025z0028n0029t002bh002cl002fd002g9002j3002kf002lr002n7002q5002r5002u5002v9002x9002yl0031p0032p003550036p0038p003ab003cz003dv003gx003il003kt003mh003p9003q9003tr003vj003xv003z70042t0043x0046x0048r004ar004cj004gb004hj004ld004mp004p9004r7004uj004vv004yz0050z0053b0055b0059f005aj005ep005gp005jd005l1005od005pp005u1005w7005z30060v0064j00661006aj006cr006ez006h9006lv006n7006rj006tb006wb006yn0073f0074z0078b007aj007dr007g7007l5007mh007rh007th007wt007z9008390084x0089d008bx008ex008gx008m7008nz008tb008vz008yn0090z0096f00983009dl009ft009jh009m9009q
s = '0 2 3 5 7 b d j n t x 17 1b 1n 1t 21 29 2p 2v 3d 3l 3x 47 4t 51 5l 5x 6f 6r 7j 7r 8l 91 9l a1 ap b1 c1 cj d7 dn er f3 g9 gt hh i3 jd jt kz lj mf n3 oj p1 q5 qt rt sl u7 un wb x5 y5 z1 10d 10x 12r 13n 14v 15j 17h 185 1a5 1b5 1c9 1d9 1ex 1fl 1hr 1in 1k5 1l9 1nj 1o7 1pz 1r5 1sp 1tt 1w9 1wx 1yx 205 21t 233 253 25z 28n 29t 2bh 2cl 2fd 2g9 2j3 2kf 2lr 2n7 2q5 2r5 2u5 2v9 2x9 2yl 31p 32p 355 36p 38p 3ab 3cz 3dv 3gx 3il 3kt 3mh 3p9 3q9 3tr 3vj 3xv 3z7 42t 43x 46x 48r 4ar 4cj 4gb 4hj 4ld 4mp 4p9 4r7 4uj 4vv 4yz 50z 53b 55b 59f 5aj 5ep 5gp 5jd 5l1 5od 5pp 5u1 5w7 5z3 60v 64j 661 6aj 6cr 6ez 6h9 6lv 6n7 6rj 6tb 6wb 6yn 73f 74z 78b 7aj 7dr 7g7 7l5 7mh 7rh 7th 7wt 7z9 839 84x 89d 8bx 8ex 8gx 8m7 8nz 8tb 8vz 8yn 90z 96f 983 9dl 9ft 9jh 9m9 9qx 9sp 9x5 9zz a3n a6b abb acn aih ald ap9 as7 awv ayv b3v b6v bav bd3 bif bkf bql bt9 bwl bzp c5z c7z ceb cgr ck3 cn7 ctn cvn d0r d3z d8b daz dhl djd dq1 dt3 dxl e0x e5l e7t edt eh5 elp eoh evf exf f3j f71 fal fe5 fl9 fnl ftl fw9 g0x g4j gbt ge1 gjt gmt grp gvd h2t h4t hcb hfv hjv