摘要: A Count Task Problem Description Count is one of WNJXYK’s favorite tasks. Recently, he had a very long string and he wondered that how many substrings 阅读全文
posted @ 2019-05-30 19:30 十魇 阅读(611) 评论(0) 推荐(0) 编辑
摘要: N皇后Problem Description 在N N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input 共有若干行,每行一个正整数N≤10,表示棋盘和皇后 阅读全文
posted @ 2019-05-27 21:16 十魇 阅读(332) 评论(0) 推荐(0) 编辑
摘要: Problem Description Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO". Input each test case contains two numbers 阅读全文
posted @ 2019-05-27 12:04 十魇 阅读(374) 评论(0) 推荐(0) 编辑
摘要: 静态变量static,只进行一次初始化。 include include using namespace std; int main() { for(int i=0;i include int main() { char str[ ]="This , a sample string OK." cha 阅读全文
posted @ 2019-05-27 11:28 十魇 阅读(87) 评论(0) 推荐(0) 编辑
摘要: hide handkerchief Problem Description The Children’s Day has passed for some days .Has you remembered something happened at your childhood? I remember 阅读全文
posted @ 2019-05-20 20:49 十魇 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 测试程序 char strchr(const char str,int c); strncpy(char s1[a],char s2[b],n) strncat(const char s1[a],char s2[b],n); char strstr(const char str,const char 阅读全文
posted @ 2019-05-20 19:24 十魇 阅读(443) 评论(0) 推荐(0) 编辑
摘要: D Aggressive cows 农夫 John 建造了一座很长的畜栏,它包括N (2 Input 有多组测试数据,以EOF结束。 第一行:空格分隔的两个整数N和C 第二行——第N+1行:分别指出了xi的位置 Output 每组测试数据输出一个整数,满足题意的最大的最小值,注意换行。 Sample 阅读全文
posted @ 2019-05-13 21:01 十魇 阅读(289) 评论(0) 推荐(0) 编辑
摘要: C Lucky 7 in the Pocket BaoBao loves number 7 but hates number 4, so he refers to an integer as a "lucky integer" if is divisible by 7 but not divisib 阅读全文
posted @ 2019-05-08 19:42 十魇 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 深度搜索:Oil Deposits GeoSurvComp地质调查公司负责探测地下石油储藏。 GeoSurvComp现在在一块矩形区域探测石油,并把这个大区域分成了很多小块。他们通过专业设备,来分析每个小块中是否蕴藏石油。如果这些蕴藏石油的小方格相邻,那么他们被认为是同一油藏的一部分。在这块矩形区域 阅读全文
posted @ 2019-05-05 20:03 十魇 阅读(135) 评论(0) 推荐(0) 编辑
摘要: B Maximal Continuous Rest Each day in Berland consists of n hours. Polycarp likes time management. That's why he has a fixed schedule for each day — i 阅读全文
posted @ 2019-04-17 20:33 十魇 阅读(138) 评论(0) 推荐(0) 编辑
GenerateContentList