https://code.google.com/codejam/contest/90101/dashboard#s=p1 Problem Geologists sometimes divide an area of land into different regions based on where rainfall flows down to. These regions are called drainage basins. Given an elevation map (a 2-dimen…
本题的 Large dataset 本人尚未解决. https://code.google.com/codejam/contest/90101/dashboard#s=p2 Problem So you've registered. We sent you a welcoming email, to welcome you to code jam. But it's possible that you still don't feel welcomed to code jam. That's w…
https://code.google.com/codejam/contest/90101/dashboard#s=p0 Problem After years of study, scientists at Google Labs have discovered an alien language transmitted from a faraway planet. The alien language is very unique in that every word consists of…
Problem It’s opening night at the opera, and your friend is the prima donna (the lead female singer). You will not be in the audience, but you want to make sure she receives a standing ovation – with every audience member standing up and clapping the…
Problem It’s opening night at the opera, and your friend is the prima donna (the lead female singer). You will not be in the audience, but you want to make sure she receives a standing ovation – with every audience member standing up and clapping the…
Introduction Cookie Clicker is a Javascript game by Orteil, where players click on a picture of a giant cookie. Clicking on the giant cookie gives them cookies. They can spend those cookies to buy buildings. Those buildings help them get even more co…
This problem is the hardest problem to understand in this round. If you are new to Code Jam, you should probably try to solve the other problems first. Problem Naomi and Ken sometimes play games together. Before they play, each of them gets Nidentica…
https://code.google.com/codejam/contest/3274486/dashboard Problem The kitchen at the Infinite House of Pancakes has just received an order for a stack of K pancakes! The chef currently has N pancakes available, where N ≥ K. Each pancake is a cylinder…
Problem In a kingdom there are prison cells (numbered 1 to P) built to form a straight line segment. Cells number i and i+1 are adjacent, and prisoners in adjacent cells are called "neighbours." A wall with a window separates adjacent cells, and…
Problem Minesweeper is a computer game that became popular in the 1980s, and is still included in some versions of the Microsoft Windows operating system. This problem has a similar idea, but it does not assume you have played Minesweeper. In this pr…
拿下 ABD, 顺利晋级, 预赛的时候C没有仔细想,推荐C题,一个非常不错的构造题目! A Magic Trick 简单的题目来取得集合的交并 1: #include <iostream> 2: #include <algorithm> 3: #include <set> 4: #include <vector> 5: using namespace std; 6: int main() 7: { 8: freopen("A-small-attem…
Google Code Jam Africa 2010 Qualification Round Problem B. Reverse Words https://code.google.com/codejam/contest/351101/dashboard#s=p1 Problem Given a list of space separated words, reverse the order of the words. Each line of text contains L letters…
Google Code Jam Qualification Round Africa 2010 Problem A. Store Credit https://code.google.com/codejam/contest/351101/dashboard#s=p0 Problem You receive a credit C at a local store and would like to buy two items. You first walk through the store an…
Google Code Jam Qualification Round Africa 2010 的第一题,很简单. Problem You receive a credit C at a local store and would like to buy two items. You first walk through the store and create a list L of all available items. From this list you would like to b…
Google Code Jam 2010 Round 1C Problem A. Rope Intranet https://code.google.com/codejam/contest/619102/dashboard#s=p0 Problem A. Rope Intranet A company is located in two very tall buildings. The company intranet connecting the buildings consists of m…
Problem B. Cookie Clicker Alpha   Introduction Cookie Clicker is a Javascript game by Orteil, where players click on a picture of a giant cookie. Clicking on the giant cookie gives them cookies. They can spend those cookies to buy buildings. Those bu…
Problem A. Magic Trick Small input6 points You have solved this input set.   Note: To advance to the next rounds, you will need to score 25 points. Solving just this problem will not give you enough points. Problem Recently you went to a magic show.…
Google Code Jam 2008 资格赛的第一题:Saving the Universe. 问题描述如下: Problem The urban legend goes that if you go to the Google homepage and search for "Google", the universe will implode. We have a secret to share... It is true! Please don't try it, or te…
Note: To advance to the next rounds, you will need to score 25 points. Solving just this problem will not give you enough points. Problem Recently you went to a magic show. You were very impressed by one of the tricks, so you decided to try to figure…
https://code.google.com/codejam/contest/619102/dashboard#s=p1&a=1 Problem Now that you have won Code Jam and been hired by Google as a software engineer, you have been assigned to work on their wildly popular programming contest website. Google is ex…
Problem A permutation of size N is a sequence of N numbers, each between 0 and N-1, where each number appears exactly once. They may appear in any order. There are many (N factorial, to be precise, but it doesn't matter in this problem) permutations…
为了熟悉一下code jam的平台,今天简单试了一下,做了一下Qualification Round Africa 2010的三道题目,都是很基础的. A题:给一个数n和一系列数a[],从a[]中找出两个数的和等于n,输出这两个数的下标. #include <cstdio> #define MAXN 2010 int p[MAXN]; int main() { #ifdef LOCAL freopen("A-large-practice.in", "r"…
二,RoundC import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.InputStreamReader; import java.io.PrintStream; import java.util.ArrayList; import java.util.…
二,RoundC import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.InputStreamReader; import java.io.PrintStream; import java.util.ArrayList; import java.util.…
通过的第一题,留做纪念,呵呵,非常简单,Africa 2010, Qualification Round: Store Credit. #include <stdio.h> #include <stdlib.h> int main(void) { int N,C,I; int *p; int i,j,k; freopen("in.in", "r", stdin); freopen("out", "w",…
Problem B. Infinite House of Pancakes Problem's Link:   https://code.google.com/codejam/contest/6224486/dashboard#s=p1 Mean: 有无限多个盘子,其中有n个盘子里面放有饼,每分钟你可以选择两种操作中的一种: 1.n个盘子里面的饼同时减少1: 2.选择一个盘子里面的饼,分到其他盘子里面去: 目标是让盘子里的饼在最少的分钟数内吃完,问最少的分钟数. analyse: 可以分析出,先…
Problem A. Standing Ovation Problem's Link:   https://code.google.com/codejam/contest/6224486/dashboard#s=p0 Mean: 题目说的是有许多观众,每个观众有一定的羞涩值,只有现场站起来鼓掌的人数达到该值才会站起来鼓掌,问最少添加多少羞涩值任意的人,才能使所有人都站起来鼓掌. analyse: 贪心模拟一下,从前往后扫一遍就行. Time complexity: O(n) Source cod…
https://code.google.com/codejam/contest/544101/dashboard#s=p0     Problem In the exciting game of Join-K, red and blue pieces are dropped into an N-by-N table. The table stands up vertically so that pieces drop down to the bottom-most empty slots in…
https://code.google.com/codejam/contest/635101/dashboard#s=p1   Problem A flock of chickens are running east along a straight, narrow road. Each one is running with its own constant speed. Whenever a chick catches up to the one in front of it, it has…
https://code.google.com/codejam/contest/635101/dashboard#s=p0   Problem On Unix computers, data is stored in directories. There is one root directory, and this might have several directories contained inside of it, each with different names. These di…