码迷,mamicode.com
首页 >  
搜索关键字:string to integer at    ( 107772个结果
LeetCode第235场周赛题解
LeetCode第235场周赛题解 截断句子 按照题目要求模拟即可,把单词读入到vector中,然后按要求拼接即可 class Solution { public: string truncateSentence(string s, int k) { vector<string> a; string ...
分类:其他好文   时间:2021-04-06 14:34:00    阅读次数:0
【LeetCode-415】字符串相加
问题 给定两个字符串形式的非负整数 num1 和num2 ,计算它们的和。 提示: num1 和num2 的长度都小于 5100 num1 和num2 都只包含数字 0-9 num1 和num2 都不包含任何前导零 你不能使用任何內建 BigInteger 库, 也不能直接将输入的字符串转换为整数形 ...
分类:其他好文   时间:2021-04-06 14:29:11    阅读次数:0
DNA Laboratory POJ - 1795
原题链接 考察:状压dp+dfs寻找路径 思路: 重复覆盖问题.参考愤怒的小鸟的思路,我们需要两两构造一个包含两个字符串a,b的DNA序列,然后要分a在前面与b在前面两种情况. 本蒟蒻一开始想的是定义结构体String,再定义结构体内部的st(二进制标记哪些串被标记),构造后的具体字符串s.每个状态 ...
分类:其他好文   时间:2021-04-06 14:25:16    阅读次数:0
Java 字符串异或加密
前言 有时需要加密保存数据,但是我不会用AES……所以选择了更简单的异或加密。 解决方案 public static String xor(String data, String password) { //异或加密 byte b1[] = data.getBytes(); byte b2[] = ...
分类:编程语言   时间:2021-04-06 14:14:59    阅读次数:0
LCP 17. 速算机器人
仅供自己学习 思路: 直接遍历判断即可 class Solution { public: int calculate(string s) { int n=s.length(); int x=1,y=0; for(int i=0;i<n;++i){ if(s[i]=='A') x = 2*x+y; e ...
分类:其他好文   时间:2021-04-06 14:14:23    阅读次数:0
笔试:输入输出
█ 0.代码函数: ○ 0.1 边界 Integer.MAX_VALUE int[] preorder ==> preorder == null || preorder.length == 0 char[][] board ==> board == null int[][] matrix ==> ( ...
分类:其他好文   时间:2021-04-06 14:10:55    阅读次数:0
Java基础--循环结构
循环结构 while 循环 while是最基本得循环,它的结构为: while(布尔表达式){ //循环内容 } 只要布尔表达式为true,循环就会一直执行下去 public class WhileDemo01 { public static void main(String[] args) { / ...
分类:编程语言   时间:2021-04-06 14:10:11    阅读次数:0
C++ 按行输入
string s; while(getline(cin,s)){ cout<<s<<endl; } ...
分类:编程语言   时间:2021-04-06 14:01:34    阅读次数:0
CompletionService与异常
1 package Six_CompletionService_Exception_Demo; 2 3 import java.util.concurrent.Callable; 4 5 public class MyCallableA implements Callable<String> { 6 ...
分类:其他好文   时间:2021-04-05 12:43:29    阅读次数:0
StringBuffer类、Arrays工具类、包装类、Character类
StringBuffer类、Arrays工具类、包装类、Character类 StringBuffer 是一个可变的字符串,是线程安全的字符串(效率低)用于拼接字符串; 构造方法 pubilc StringBuffer(String str); 指定字符串内容的字符串缓冲区对象 添加功能 pubil ...
分类:其他好文   时间:2021-04-05 12:40:44    阅读次数:0
107772条   上一页 1 ... 81 82 83 84 85 ... 10778 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!