原题 Linked lists are great! They let you chain pieces of data together. nc pwn.chal.csaw.io 9005 链接:https://ctftime.org/task/6644 附件:(下面那个打不开的图片就是,请将文件下载下来改名为shellpointcode) 题解 首先看下文件的基本信息: $ file shellpointcode shellpointcode: ELF 64-bit LSB shared o…
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 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…
2014 Qualification Round Solutions 2013年11月25日下午 1:34 ...最简单的一题又有bug...自以为是真是很厉害! 1. Square Detector (20 Points) When facing a problem in a programming contest there are three main things to consider when planning your solution. In order of importanc…
Facebook Hacker Cup 2014 Qualification Round比赛Square Detector题的解题报告.单击这里打开题目链接(国内访问需要那个,你懂的). 原题如下: Square Detector Problem Description You want to write an image detection system that is able to recognize different geometric shapes. In the first ver…
题目地址:http://blog.csdn.net/shiyuankongbu/article/details/10004443 /* 题意:在i前面找回文子串,在i后面找回文子串相互配对,问有几对 DP:很巧妙的从i出发向两头扩展判断是否相同来找回文串 dpr[i] 代表记录从0到i间的回文子串的个数,dpl[i] 代表记录i之后的回文子串个数 两两相乘就行了 详细解释:http://blog.csdn.net/shiyuankongbu/article/details/10004443 */…
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…
本题的 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…
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…
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…
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…
C. Cd and pwd commands Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/problemset/problem/158/C Description Vasya is writing an operating system shell, and it should have commands for working with directories. To begin with, he dec…
Cd and pwd commands time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Vasya is writing an operating system shell, and it should have commands for working with directories. To begin with, he…
1. 下载官方 pycharm https://www.jetbrains.com/pycharm/download/ 2. 点击获取激活码 点击获取激活码 2.1 打开  hosts 文件 2.2  使用前请将“0.0.0.0    account.jetbrains.com   ”添加到hosts文件中 3. 粘贴赋值的 code 注册码 点击 ok即可完成…
原题地址链接:https://code.google.com/codejam/contest/351101/dashboard#s=p2 问题描述: Problem The Latin alphabet contains 26 characters and telephones only have ten digits on the keypad. We would like to make it easier to write a message to your friend using a…
原题地址链接: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 and W words. A line will only consist of letters and space…
原题地址链接: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 and create a list L of all available items. From this list yo…
C. Promocodes with Mistakes 题目连接: http://www.codeforces.com/contest/637/problem/C Description During a New Year special offer the "Sudislavl Bars" offered n promo codes. Each promo code consists of exactly six digits and gives right to one free…
Code Review 代码评审是指在软件开发过程中,对源代码的系统性检查.通常的目的是查找系统缺陷,保证软件总体质量和提高开发者自身水平. Code Review是轻量级代码评审,相对于正式代码评审,轻量级代码评审所需要的各种成本要明显低的多,如果流程正确,它可以起到更加积极的效果.正因如此,轻量级代码评审经常性得被引入到软件开发过程中. Code Review 在质量管理中重要性,排NO.1,其二是 单元测试. 真实重视信息系统质量公司都有CodeReview环节 今天先到这儿,希望对技术领…
C. String Manipulation 1.0 Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 codeforces.com/problemset/problem/91/B Description One popular website developed an unusual username editing procedure. One can change the username only by deleting some characte…
题意:有一个串s,n个串模式串t,问s的子串中长度最小的包含t k次的长度是多少 题解:把所有t建ac自动机,把s在ac自动机上匹配.保存每个模式串在s中出现的位置.这里由于t两两不同最多只有xsqrt(x),x是总长度.然后双指针扫一遍即可 这里有一个很重要的优化技巧,由于ac自动机上不是每个点都是t的结尾,我们把fail向上跳一次变成直接跳到t的结尾,build预处理一下 //#pragma GCC optimize(2) //#pragma GCC optimize(3) //#pragm…
本渣清明节 闲里偷忙 做了一下codejam 水平不出意外的在投稿之后一落千丈 后两题的hidden test竟然都挂了 A. Foregone Solution 水题,稍微判断一下特殊情况(比如1000, 5000这种)就好了 #include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cstr…
今天在codeforces上面做到一道题:http://codeforces.com/contest/638/problem/B 题目大意是:给定n个字符串,找到最短的字符串S使得n个字符串都是这个字符串S的子串. 题目里有一个限制条件是每个字母都最多出现一次,所以可以用下面的方法来解决: http://codeforces.com/contest/638/submission/16900955 然后我想到如果问题没有“每个字母最多只出现一次”这个限制的话应该怎么解决. 暂时还在想………
题目链接: http://codeforces.com/problemset/problem/522/D D. Closest Equals time limit per test3 secondsmemory limit per test256 megabytes 问题描述 You are given sequence a1, a2, ..., an and m queries lj, rj (1 ≤ lj ≤ rj ≤ n). For each query you need to print…