摘要: 蛇形填数时间限制:3000ms | 内存限制:65535KB难度:3描述在n*n方陈里填入1,2,...,n*n,要求填成蛇形。例如n=4时方陈为:10 11 12 19 16 13 28 15 14 37 6 5 4输入直接输入方陈的维数,即n的值。(n 2 #include 3 int a[1... 阅读全文
posted @ 2015-02-27 14:55 Tiey 阅读(199) 评论(0) 推荐(0)
摘要: 大数阶乘时间限制:3000ms | 内存限制:65535KB难度:3描述我们都知道如何计算一个数的阶乘,可是,如果这个数很大呢,我们该如何去计算它并输出它?输入输入一个整数m(0 2 #include 3 #define N 1000010 4 int a[N]; 5 int imitation(i... 阅读全文
posted @ 2015-02-27 13:10 Tiey 阅读(214) 评论(0) 推荐(0)
摘要: 括号配对问题时间限制:3000ms | 内存限制:65535KB难度:3描述现在,有一行括号序列,请你检查这行括号是否配对。输入第一行输入一个数N(0 3 using namespace std; 4 #include 5 #include 6 int main() 7 { 8 int n;... 阅读全文
posted @ 2015-02-27 12:15 Tiey 阅读(172) 评论(0) 推荐(0)
摘要: Binary String Matching时间限制:3000ms | 内存限制:65535KB难度:3描述Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell ho... 阅读全文
posted @ 2015-02-27 12:12 Tiey 阅读(171) 评论(0) 推荐(0)
摘要: 一种排序时间限制:3000ms | 内存限制:65535KB难度:3描述现在有很多长方形,每一个长方形都有一个编号,这个编号可以重复;还知道这个长方形的宽和长,编号、长、宽都是整数;现在要求按照一下方式排序(默认排序规则都是从小到大);1.按照编号从小到大排序2.对于编号相等的长方形,按照长方形的长... 阅读全文
posted @ 2015-02-27 12:03 Tiey 阅读(223) 评论(0) 推荐(0)