#include #include #include using namespace std; struct Student{ char name[105]; int grade; int age; }student[1005]; bool cmp(Student a,Student b){ if(... ...
分类:
其他好文 时间:
2017-06-21 21:05:38
阅读次数:
159
这里digit每一位的权重都乘以10000; 如果不是特别大的数,没必要;乘以10000后,把字符串转化为数字比较麻烦 ...
分类:
其他好文 时间:
2017-06-21 13:51:43
阅读次数:
99
#include int process(int n,int d){ int res=0; while(n!=0){ if(n%10==d) res=res*10+n%10; n/=10; } return res; } int main(){ int a,da,b,db,pa,pb; ... ...
分类:
其他好文 时间:
2017-06-21 11:34:30
阅读次数:
140
两种情况:把月饼全部买完(库存刚好满足需求,或库存小于需求);买了部分月饼。 ...
分类:
其他好文 时间:
2017-06-20 22:22:20
阅读次数:
124
原题链接:https://oj.leetcode.com/problems/binary-tree-inorder-traversal/ 题目大意:中序遍历二叉树 解题思路:中序遍历二叉树。中序遍历二叉树的左子树,訪问根结点,中序遍历二叉树的右子树。非递归实现时,用一个栈模拟遍历过程就可以。由于须要 ...
分类:
其他好文 时间:
2017-06-20 18:41:42
阅读次数:
129
http://acm.hdu.edu.cn/game/entry/problem/list.php?chapterid=1§ionid=2 1.2.5 #include<stdio.h> /* 题意:找闰年。 if((i%4==0 && i%100!=0) || i%400==0)count++; ...
分类:
其他好文 时间:
2017-06-20 14:44:26
阅读次数:
137
Description You probably have played the game "Throwing Balls into the Basket". It is a simple game. You have to throw a ball into a basket from a cer ...
分类:
其他好文 时间:
2017-06-18 15:52:37
阅读次数:
153
【BZOJ3209】花神的数论题 Description 背景众所周知,花神多年来凭借无边的神力狂虐各大 OJ、OI、CF、TC …… 当然也包括 CH 啦。描述话说花神这天又来讲课了。课后照例有超级难的神题啦…… 我等蒟蒻又遭殃了。花神的题目是这样的设 sum(i) 表示 i 的二进制表示中 1 ...
分类:
其他好文 时间:
2017-06-18 15:14:35
阅读次数:
148
重叠的最长子串 http://ac.jobdu.com/problem.php?pid=1535 时间限制:1 秒 内存限制:128 兆 题目描述: 给定两个字符串,求它们前后重叠的最长子串的长度,比如"abcde"和“cdefg”是"cde",长度为3。 输入: 输入可能包含多个测试案例。对于每个 ...
分类:
其他好文 时间:
2017-06-18 15:10:48
阅读次数:
211