摘要:
Given a sequence of integers,a1,a2,...,an, we define itssign matrix Ssuch that, for1ijn,Sij= `` + "ifai+...+aj> 0;Sij= `` - "ifai+...+ajf[i-1],f[j]
#include
#include
#include
using namespace std;
const int mm=15;
vector g[mm];
int id[mm],f[mm],ans[mm];
int cas,n;
void get(int n)
{ char 阅读全文
posted @ 2013-06-21 12:08
剑不飞
阅读(134)
评论(0)
推荐(0)
摘要:
Problem B: Fire!Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. Help Joe escape the maze.Given Joe's location in the maze and which squares of the maze are on fire, you must determine whether Joe can 阅读全文
posted @ 2013-06-21 10:46
剑不飞
阅读(145)
评论(0)
推荐(0)

浙公网安备 33010602011771号