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 javax.imageio.*; | |
import javax.imageio.stream.ImageOutputStream; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.IOException; | |
public class GifWriter { | |
ImageWriter iw = ImageIO.getImageWritersByFormatName("gif").next(); | |
BufferedImage buffer; | |
boolean finish = false; |
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.math.BigDecimal; | |
import java.math.MathContext; | |
import java.util.*; | |
// -------8<------- start of solution submitted to the website -----8<------- | |
public class PoisonedWine { | |
// params | |
static double LOG_COEF = 0.3 + 0.002 * 50; // 0.30-0.50:0.002*100 | |
static double TEST_SUB = 0.0 + 0.05 * 66; // 0-5:0.05*100 |
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.ArrayList; | |
import java.util.List; | |
import org.opencv.core.Core; | |
import org.opencv.core.Mat; | |
import org.opencv.core.Scalar; | |
import org.opencv.core.Size; | |
import org.opencv.imgcodecs.Imgcodecs; | |
import org.opencv.imgproc.Imgproc; |
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
# -*- coding: utf-8 -*- | |
import pygame | |
import sys | |
import random | |
import shapely.geometry as sg | |
class Pos: | |
def __init__(self, x, y): | |
self.x = x |