Water
Aoxuets
REM 是我的, 拔剑吧!
展开
-
HDU 1250
简单大数 (要压位,不然会超内存) #include #include #include #include #include using namespace std; const int base = 1000000; struct BigInt { vectorint> Num; BigInt() { Num.clear(); } void Set(原创 2016-03-14 10:54:55 · 270 阅读 · 0 评论 -
51Nod--1384全排列
1384 全排列 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注 给出一个字符串S(可能又重复的字符),按照字典序从小到大,输出S包括的字符组成的所有排列。例如:S = “1312”, 输出为:1123 1132 1213 1231 1312 1321 2113 2131 2311 3112 3121 3211 Input原创 2016-03-14 13:13:11 · 1040 阅读 · 0 评论 -
Light OJ 1148
题意: 给你N 个人, 每个人说出有多少人和他一队, 不包括他自己, 输出总人数最少值 思路: 排个序, 按照给的数目把人分为一组,就可以得出最少人数 #include using namespace std; const int maxn = 50 + 13; int Num[maxn]; int main() { int t, N; scanf("%d",原创 2016-03-14 10:59:56 · 324 阅读 · 0 评论 -
Light OJ 1116
基础数学:.. #include using namespace std; typedef unsigned long long ULL; int main() { int t; scanf("%d",&t); for(int kase = 1; kase <= t; ++kase) { ULL W; sca原创 2016-03-14 10:59:54 · 422 阅读 · 0 评论 -
Light OJ 1020
简单推理题; #include using namespace std; int main() { int T, n; string Name; cin >> T; for(int kase = 1; kase <= T; ++kase) { cin >> n >> Name; if(Name ==原创 2016-03-14 10:59:49 · 367 阅读 · 0 评论 -
Light OJ 1012
经典搜索水题...... #include using namespace std; const int maxn = 20 + 13; const int step[4][2] = {0,1,0,-1,1,0,-1,0}; bool Vis[maxn][maxn]; char Map[maxn][maxn]; int Num, N, M; void BFS(int x,原创 2016-03-14 10:59:45 · 361 阅读 · 0 评论 -
CF 489C 暴力处理
题意: 给你 数的长度 m, 数的每个数的和 Sum; 输出 这个数最小值 和最大值 #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int Sum, m; cin >> m >> Sum; int tmp = Su原创 2016-03-14 10:55:33 · 415 阅读 · 0 评论