本系列博客主要学习和记录USACO的相关代码和总结,附上我的github地址

什么是USACO

USACO全称是The USA Computing Olympiad,主要目的是从美国高中生中选出代码能力很强的人去代表美国参加International Olympiad in Informatics,即国际信息学奥林匹克竞赛。

有关USACO Training

USACO主要面向有一到两年编程经验的,同时对编程算法有很大兴趣的人。题目难度设置合理,值得一刷。官网上建议的刷题速度是最多用两个周解决一道题,不然就太费时间了。当然了,高手是越快越好。

代码提交

USACO支持C/C++/C++11/PASCAL/Java和Python。评分系统和IOI一致。鉴于我主要用Java来刷题,这里放一个Java版的代码提交格式。

/*
ID: your_id_here
LANG: JAVA
TASK: test
*/
import java.io.*;
import java.util.*; class test {
public static void main (String [] args) throws IOException {
// Use BufferedReader rather than RandomAccessFile; it's much faster
BufferedReader f = new BufferedReader(new FileReader("test.in"));
// input file name goes above
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("test.out")));
// Use StringTokenizer vs. readLine/split -- lots faster
StringTokenizer st = new StringTokenizer(f.readLine());
// Get line, break into tokens
int i1 = Integer.parseInt(st.nextToken()); // first integer
int i2 = Integer.parseInt(st.nextToken()); // second integer
out.println(i1+i2); // output result
out.close(); // close the output file
}
}

USACO Section1.1的更多相关文章

  1. USACO Section1.2

    section1.1主要包括四道题和两个编程知识介绍.下面将对这6个部分内容进行学习. Your Ride Is Here 这道题没什么难度,读懂题目意思就行:把两个字符串按照题目要求转换成数字,然后 ...

  2. USACO Section1.3

    section1.2主要包括5道题和1个编程知识介绍.下面对这6部分内容进行学习. Complete Search 这个翻译成枚举搜索或者穷举搜索.主要用于当写代码时间不够用而且不用考虑程序的效率问题 ...

  3. USACO Section1.5 Prime Palindromes 解题报告

    pprime解题报告 —— icedream61 博客园(转载请注明出处)--------------------------------------------------------------- ...

  4. USACO Section1.4 Mother's Milk 解题报告

    milk3解题报告 —— icedream61 博客园(转载请注明出处)---------------------------------------------------------------- ...

  5. USACO Section1.3 Wormholes 解题报告

    wormhole解题报告 —— icedream61 博客园(转载请注明出处)------------------------------------------------------------- ...

  6. USACO Section1.2 Name That Number 解题报告

    namenum解题报告 —— icedream61 博客园(转载请注明出处)-------------------------------------------------------------- ...

  7. USACO Section1.1 Friday the Thirteenth 解题报告

    friday解题报告 —— icedream61 博客园(转载请注明出处) -------------------------------------------------------------- ...

  8. USACO section1.1 Broken Necklace

    /* ID: vincent63 LANG: C TASK: beads */ #include <stdio.h> #include<stdlib.h> #include&l ...

  9. USACO section1.2 Miking cows

    /* ID: vincent63 LANG: C TASK: milk2 */ #include <stdio.h> #include<stdlib.h> #include&l ...

随机推荐

  1. [翻译] UIGlossyButton

    UIGlossyButton https://github.com/waterlou/UIGlossyButton Feature create standard iPhone buttons wit ...

  2. 设计多选按钮ListChooseView

    设计多选按钮ListChooseView 答应某位女屌丝而写的控件,效果还不错,开源给大家^_^! 效果图: 源码: // // ListChooseView.h // ScrollChooseBut ...

  3. 引用js文件

    在子模板里引用js文件的时候,需要把相应的.js文件放到static目录下,如引用static/jQuery/index.js文件: {% extends "base.html" ...

  4. python离线安装外部依赖包

     1.制作requirement.txt pip freeze > requirement.txt 内网安装外部依赖包办法: 例如:安装pytest包得时候会顺带安装pytest依赖包 离线下载 ...

  5. 铁乐学python_day05-作业

    1,有如下变量(tu是个元祖),请实现要求的功能 tu = ("alex", [11, 22, {"k1": 'v1', "k2": [&q ...

  6. opengl redbook Fatal Error in XXXXXX pixel format with necessary capabilities not found

    随便运行书中的一个程序aaindex.c时出现了下面的错误:pixel format with necessary capabilities not found 解决方法: http://www.ed ...

  7. javascript unshift()和shift()

    <html> <head> <meta http-equiv="Content-Type" content="text/html; char ...

  8. C++浅拷贝和深拷贝的区别

    C++浅拷贝和深拷贝的区别 2012-04-24 21:22 11454人阅读 评论(6) 收藏 举报 c++deleteclass编译器c c++默认的拷贝构造函数是浅拷贝 浅拷贝就是对象的数据成员 ...

  9. php添加mongo模块

    可以从 http://pecl.php.net/package/mongo 下载目前的stable稳定版 我添加的是mongo-1.5.2.tgz # wget http://pecl.php.net ...

  10. 基于easyui开发Web版Activiti流程定制器详解(二)——文件列表

    上一篇我们介绍了目录结构,这篇给大家整理一个文件列表以及详细说明,方便大家查找文件. 由于设计器文件主要保存在wf/designer和js/designer目录下,所以主要针对这两个目录进行详细说明. ...