Skip to content

Instantly share code, notes, and snippets.

@dvkcool
dvkcool / plates.cpp
Created April 3, 2020 13:28
Google Kickstart 2020 A: Plates
/* Jai Mata Di */
#include <bits/stdc++.h>
#define mp make_pair
#define lli long long int
using namespace std;
int a[51][31];
int n, k;
bool vis[51][2000];
lli res[51][2000];
lli getMax(int i, int p){
import java.io.*;
import java.util.*;
public class MaxUpDown{
public static void MaximumSeq(int arr[],int n){
int upSeq[] = new int[n];
int downSeq[] = new int[n];
int i,j,max = 0;
int maxIndex = 0;
for ( i = 0; i < n; i++ ){
import java.io.*;
import java.util.*;
public class Polygon{
public static int counter = 0;
public static void checkeach(double data[], int r){
double sum = 0;
for(int i=0; i<r; i++){
sum+=data[i];
}
#
# Version checks for Mac
#
dialog_try_or_exit()
{
osascript $BINPATH/checkmacosx.applescript "$1" || exit 128
}
#
# Version checks for Mac
#
dialog_try_or_exit()
{
quitStatus=$(/usr/bin/osascript <<EOT
tell application "System Events" -- Mandatory to use tell application otherwise, osascript complains
activate
display dialog item 1 of argv buttons {"Try anyway", "Quit"} default button "Quit"
if the button returned of the result is "Quit" then
#!/bin/sh
# shellcheck disable=SC2155
# shellcheck disable=SC2164
# shellcheck disable=SC1091
# shellcheck disable=SC1117
# Checking if user has root access
if [[ $EUID -ne 0 ]]; then
echo "You must run this script with root permissions."
exit 0
#!/bin/sh
#
# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
# Copyright (C) INRIA - 2006-2008 - Sylvestre Ledru
# Copyright (C) INRIA - 2008 - Simon Lipp
# Copyright (C) DIGITEO - 2009-2011 - Sylvestre Ledru
# Copyright (C) DIGITEO - 2010-2011 - Bruno JOFRET
# Copyright (C) 2012 - 2016 - Scilab Enterprises
#
# This file is hereby licensed under the terms of the GNU GPL v2.0,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>libjli.dylib</string>
<key>CFBundleGetInfoString</key>
<string>Java SE 1.8.0_171</string>