码迷,mamicode.com
首页 >  
搜索关键字:cpp ace    ( 32997个结果
52. 两个链表的第一个公共结点
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } };*/class Solution { public: ListNode* FindFirstCommonNo ...
分类:其他好文   时间:2021-03-29 12:50:50    阅读次数:0
java 一个任务需要多个线程按照一定顺序执行,如果执行错误就执行错误函数
//在一定时间内,等待某个事件//小于currentStatus的标志位都是true,才能继续向下,不然就报错 // status 状态表,currentStatus 当前线程状态位置,timeout 超时时间,funcSuccess 规定时间内要执行的函数,funcError 超过规定时间后要执行 ...
分类:编程语言   时间:2021-03-29 11:38:22    阅读次数:0
分享一个统计文档中不同key的个数的python脚本
前提: 原统计文档中条目以空格分隔或只有一列(为了方便awk筛选出某一个列) 1 #!/usr/bin/env python 2 # -*- coding:utf-8 -*- 3 import sys 4 import os 5 6 PRINTRED = "\033[1;31m" 7 PRINTGR ...
分类:编程语言   时间:2021-03-18 14:42:22    阅读次数:0
Winform基础详解三——关于program.cs
Winform基础详解三——关于program.cs program是整个Winform程序的主入口点。 [STAThread] 表示一种当前应用程序的特性 表示当前COM线程模型是单线程单元 如果没有它,winform应用程序是无法工作的 using System; using System.Co ...
分类:Windows程序   时间:2021-03-18 14:35:52    阅读次数:0
Scanner进阶使用
1 package com.pingfan.scanner; 2 3 import java.util.Scanner; 4 5 public class Demo3 { 6 public static void main(String[] args) { 7 Scanner scanner = n ...
分类:其他好文   时间:2021-03-18 14:30:41    阅读次数:0
数组作为函数参数传递
数组作为函数参数传递的时候,会退化为指针,并不能得到数组的大小 一 void test1(int a[]) { cout << sizeof(a) << endl; } int main() { int a[4]; test1(a); } 输出结果是指针的大小,并不是数组的大小 二 void tes ...
分类:编程语言   时间:2021-03-18 14:12:35    阅读次数:0
c程序编译错误处理办法
error: C++ preprocessor "/lib/cpp" fails sanity check 问题的根源是缺少必要的C++库。如果是CentOS系统,运行,如下命令解决: yum install -y glibc-headers gcc-c++ Ubuntu系统中,运行命令: apt- ...
分类:其他好文   时间:2021-03-18 14:06:28    阅读次数:0
PAT(乙级)2021年春季考试
比赛链接:https://pintia.cn/market/item/1371703238093053952 7-1 打印三角形拼图 (15 分) 题解 找规律。 代码 #include <bits/stdc++.h> using namespace std; int main() { ios::s ...
分类:其他好文   时间:2021-03-17 15:03:51    阅读次数:0
02 | 列表和元组到底用哪一个?
一、 列表和元组基础 列表和元组都是一个可以放置任意数据类型的有序集合。对于python的列表和元组来说,集合的数据类型不像其他编程语言一样必须要求一致。 l = [1, 2, 'hello', 'world'] # 列表中同时含有int和string类型的元素 l [1, 2, 'hello', ...
分类:其他好文   时间:2021-03-17 14:58:14    阅读次数:0
LeetCode_424_替换后的最长字符串
class Solution { public int characterReplacement(String s, int k) { int left =0,right=0; int maxLength = -1; int result = 0; char[] charNums = new cha ...
分类:其他好文   时间:2021-03-17 14:50:06    阅读次数:0
32997条   上一页 1 ... 24 25 26 27 28 ... 3300 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!