一般的入门顺序: 0. C语言的基本语法(或者直接开C++也行,当一个java选手可能会更受欢迎,并且以后工作好找,但是难度有点大),[参考书籍:刘汝佳的<算法竞赛入门经典>,C++入门可以考虑<c++ primer plus>,java选手可以考虑<think in java>or中文版<java编程思想>,请远离谭浩强...]可以选择切一些特别水的题巩固以及适应一下ACM中常见的输入输出格式...例如杭电著名的100题 Problem Set1. 一些基…
最近在尝试做acm试题,刚刚是1001题就把我困住了,这是题目: Problem Description In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n. Input The input will consist of a series of integers n, one integer per line Output For each case, output SUM(n) in one…
acm 本文由swellspirit贡献 ACM • I can accept failure. but I can't accept not trying. Life is often compared to a marathon, but I think it is more like being a sprinter; long stretches of hard work punctuated by brief moments in which we are given the oppo…
题意:给出一个N*M的矩形区域和每个区域的状态--有/没有石油,(定义)如果两个有石油的区域是相邻的(水平.垂直.斜)则认为这是属于同一个oil pocket. 求这块矩形区域一共有多少oilpocket #include <stdio.h> int grid[101][101]; char s[102][102]; int m,n; int dir[4][2]={{-1,0},{1,0},{0,1},{0,-1}}; void dfs(int x,int y) { int i,xx,yy;…
Milk Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 15697 Accepted Submission(s): 3947 Problem Description Ignatius drinks milk everyday, now he is in the supermarket and he wants to choose…
A + B Problem(1000) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 355051 Accepted Submission(s): 110841 Problem Description Calculate A + B. Input Each line will contain two integers A a…