随笔分类 - 水
摘要:题意:给出两组数字,第二组数字代表第一组数字中的第几位。求从那一位开始,后面不同的数的个数DescriptionSereja has an arraya, consisting ofnintegersa1,a2,...,an. The boy cannot sit and do nothing, h...
阅读全文
摘要:题意:ekjfkj=output 依此解开密码,得到题意求第n位(本身是素数,同时反过来也是素数的数)题解:打表注意:数组开大,反过来的数不能是自己本身Descriptionqd ucyhf yi q fhycu dkcruh mxeiu huluhiu yi q tyvvuhudj fhycu d...
阅读全文
摘要:题意:给出一组数字,得到区间[1,a1],[a1+1,a1+a2],[a1+a2+1,a1+a2+a3].....再给出一组数字,求这些数字属于第几个区间注意:记得数组开大,容易超时DescriptionIt is lunch time for Mole. His friend, Marmot, p...
阅读全文
摘要:题意:给位数和位数和 求符合要求的最大值和最小值//想法都有了,可是却没有做粗来(你484傻啊⁽⁽ ◟(눈_눈)◞ ⁾⁾)DescriptionYou have a positive integermand a non-negative integers. Your task is to find ...
阅读全文
摘要://错的莫名其妙的O w O第二个的格式也是莫名其妙的Input测试输入包含若干测试用例,每个测试用例占2行,第1行给出正整数K( 2 #include 3 int main() 4 { 5 int first,last,temp,n,i,j,flag,thissum; 6 ...
阅读全文
摘要:题意:一列相同就可以吃掉(这种简单的循环题竟然弄不出来好郁闷>- 2 3 #include 4 5 int main() 6 7 { 8 9 int t,n,m,i,j;10 11 char a[1000][1000];12 13 while(~scanf("%d",&t)&&t)14 1...
阅读全文
摘要:题意公司年会1.最接近2014 2.考勤>=60以上都满足考勤最大的 1 #include 2 3 #include 4 5 int main() 6 7 { 8 9 int n,i,j,a[100000][2],m,b[100000][2],min,max;10 11 in...
阅读全文
摘要:题意 给出一群人的名字,来的时间和走的时间。选出开门人和关门人题解结构体+排序 1 #include 2 3 #include 4 5 using namespace std; 6 7 #define n 1000 8 9 10 11 struct point12 13 {14 15 cha...
阅读全文
摘要://容易超时Problem Description 小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。 问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 = 11也是素数,所以它是美...
阅读全文
摘要:///分苹果给两个人 判断是否能够平分 苹果不能切,存在200g和100g的苹果我每次想这种题目都会绕很远 so sad cf上的题目果然每次都让我很暴躁啊DescriptionKitahara Haruki has bought n apples for Touma Kazusa and Ogis...
阅读全文
摘要://这个题目理解上有些坑啊 而且我后来在变量的比较上也出了一些问题,不难但是要注意看清题目的意思//应该用实际能饮用的天数去除价格,得到天数价格比。然后对其排序。Problem DescriptionIgnatius drinks milk everyday, now he is in the su...
阅读全文
摘要://题意(解):结构体排序+strcmp自己每次都要被一些问题给卡住,也不知道当时在想什么 so sadT ^ T战斗力-5的渣渣Input第一行正整数N(0#include#includeusing namespace std;struct fruit{char name[1000];char p...
阅读全文