USER: Jeremy Wu [wushuai2] TASK: ariprog LANG: C++ Compiling... Compile: OK Executing... Test 1: TEST OK [0.005 secs, 11880 KB] Test 2: TEST OK [0.008 secs, 11880 KB] Test 3: TEST OK [0.008 secs, 11876 KB] Test 4: TEST OK [0.014 secs, 11880 KB] Test…
USACO Chapter 1 解题总结 1.1.1 Your Ride Is Here 基本字符串操作,无压力. 1.1.2 Greedy Gift Givers 基础模拟题,弄明白题意,不怕麻烦,就OK了. 1.1.3 Friday the Thirteenth 自己的做法:三维数组代表年月日,400的数据范围不大,模拟走一下时间的流逝过程即可.时间复杂度O(N*12*31),多好玩. 官方标程好像用到了一个神奇的公式,好像是什么蔡勒公式. 1.1.4 Broken Necklace 2*N…
Your Ride Is Here It is a well-known fact that behind every good comet is a UFO. These UFOs often come to collect loyal supporters from here on Earth. Unfortunately, they only have room to pick up one group of followers on each trip. They do, however…
按字典序输出所有在123..n之间插入'+','-',' '结果为0的表达式.. http://train.usaco.org/usacoprob2?a=jUh88pMwCSQ&S=zerosum /* TASK:zerosum LANG:C++ */ #include<cstdio> #include<string> #include<algorithm> using namespace std; #define N 15 int n; int k[N],cn…