#include #include int main(void) { int n ; //freopen("input.txt" , "r" , stdin); //freopen("output.txt" , "w" , stdout); scanf("%d" , &n); while(n--) ... ...
分类:
其他好文 时间:
2017-07-18 01:33:40
阅读次数:
239
public class StringDemo { public static void main(String[] args) { String bigString = "javajava I love java l like jajavava I enjoy javajavajava"; Str ...
分类:
其他好文 时间:
2017-07-18 01:30:42
阅读次数:
194
package com.charles.utils; public class String2Hex { public static void main(String[] args) { String param = "ccbfc13e-c31d-42ce-8939-3c7e63ed5417"; / ...
分类:
其他好文 时间:
2017-07-18 00:12:51
阅读次数:
121
easy/intermediate What are Python decorators and how would you use them?How would you setup many projects where each one uses different versions of Py ...
分类:
其他好文 时间:
2017-07-18 00:04:02
阅读次数:
302
【算法】模拟 #include<cstdio> #include<algorithm> using namespace std; const int maxn=100010,maxm=1000010; int a[maxn],A[maxm],n; int main() { scanf("%d",&n ...
分类:
其他好文 时间:
2017-07-18 00:02:57
阅读次数:
155
注释:猜数游戏,随便猜100以内一个数,他会告诉你你猜的数偏大偏小,直到猜对为止 注释:此程将他们程序用于随机给出面值,程序会给出一种用1 5 10 20元的面值折算出来 注释:用于求阶乘 注释:用于判断随机输入一个数是不是素数 注释:用于求1/1-1/2+1/3-1/4.......... 注释: ...
分类:
其他好文 时间:
2017-07-17 23:58:33
阅读次数:
382
动态规区间dp做这道题的话应该是n^3,下面的代码优化到了n^2,用四边形不等式优化。 设mid[i][j]是dp[i][j]的最优解的断点,即它左区间的右端点,那么mid[i][j-1]<=mid[i][j]<=mid[i+1][j],所以在求解dp[i][j]时,枚举k可以只枚举这两个值之间枚举 ...
分类:
其他好文 时间:
2017-07-17 23:58:24
阅读次数:
418
https://www.luogu.org/problem/show?pid=1179 题目描述 请统计某个给定范围[L, R]的所有整数中,数字 2 出现的次数。 比如给定范围[2, 22],数字 2 在数 2 中出现了 1 次,在数 12 中出现 1 次,在数 20 中出 现 1 次,在数 21 ...
分类:
其他好文 时间:
2017-07-17 23:56:02
阅读次数:
222
public class lianxi33 { public static void main(String[] args) { int[][] a = new int[10][10]; for(int i=0; i<10; i++) { a[i][i] = 1; a[i][0] = 1; } fo... ...
分类:
其他好文 时间:
2017-07-17 23:54:04
阅读次数:
186
题目描述 终于,破解了千年的难题。小FF找到了王室的宝物室,里面堆满了无数价值连城的宝物……这下小FF可发财了,嘎嘎。但是这里的宝物实在是太多了,小FF的采集车似乎装不下那么多宝物。看来小FF只能含泪舍弃其中的一部分宝物了……小FF对洞穴里的宝物进行了整理,他发现每样宝物都有一件或者多件。他粗略估算 ...
分类:
其他好文 时间:
2017-07-17 23:47:06
阅读次数:
250