搜索结果
查询Tags标签: two,共有 134条记录-
Study Notes of CS:APP (Chapter 2)
Study Notes of CS:APP Part I Program Structure and ExecutionHow application programs are represented and executed. Chapter 2 Representing and Manipulating Information [22-01] Two-valued Signals versus Decimal Notation • Computers store and process…
2022/1/16 6:05:33 人评论 次浏览 -
1624C - Division by Two and Permutation(1100)
#include<bits/stdc++.h> using namespace std; int vis[10005],a[10005],t,n; int main(){scanf("%d",&t);while(t--){bool flag = true;scanf("%d",&n);for(int i=1;i<=n;i++){scanf("%d",&a[i]);}memset(vis,0,siz…
2022/1/14 23:33:54 人评论 次浏览 -
1624C - Division by Two and Permutation(1100)
#include<bits/stdc++.h> using namespace std; int vis[10005],a[10005],t,n; int main(){scanf("%d",&t);while(t--){bool flag = true;scanf("%d",&n);for(int i=1;i<=n;i++){scanf("%d",&a[i]);}memset(vis,0,siz…
2022/1/14 23:33:54 人评论 次浏览 -
2022-1-8-21. Merge Two Sorted Lists
合并2个有序链表 /*** Definition for singly-linked list.* public class ListNode {* int val;* ListNode next;* ListNode() {}* ListNode(int val) { this.val = val; }* ListNode(int val, ListNode next) { this.val = val; this.next = next; …
2022/1/8 23:34:16 人评论 次浏览 -
2022-1-8-21. Merge Two Sorted Lists
合并2个有序链表 /*** Definition for singly-linked list.* public class ListNode {* int val;* ListNode next;* ListNode() {}* ListNode(int val) { this.val = val; }* ListNode(int val, ListNode next) { this.val = val; this.next = next; …
2022/1/8 23:34:16 人评论 次浏览 -
167. Two Sum II - Input Array Is Sorted
Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number. Let these two numbers be numbers[index1] and numbers[index2] where 1 <= index1 < inde…
2022/1/7 6:03:39 人评论 次浏览 -
167. Two Sum II - Input Array Is Sorted
Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number. Let these two numbers be numbers[index1] and numbers[index2] where 1 <= index1 < inde…
2022/1/7 6:03:39 人评论 次浏览 -
零基础java自学流程-Java语言高级384
package com.java.juc; /*** 题目:判断打印 "one" or "two"* * 1.两个普通同步方法,两个线程 ,标准打印,打印?// one two* 2.新增Thread.sleep(3000) 给getOne() 打印? // 3s 后打印 one two* 3.新增普通方法 getThreee 打印?// 先打印three 三…
2022/1/6 17:33:55 人评论 次浏览 -
零基础java自学流程-Java语言高级384
package com.java.juc; /*** 题目:判断打印 "one" or "two"* * 1.两个普通同步方法,两个线程 ,标准打印,打印?// one two* 2.新增Thread.sleep(3000) 给getOne() 打印? // 3s 后打印 one two* 3.新增普通方法 getThreee 打印?// 先打印three 三…
2022/1/6 17:33:55 人评论 次浏览 -
【Codeforces】550A-Two Substrings
每天随机做一道CF题并写题解,希望有朝一日能拿块牌子(rating:1300~1800) 原题链接:Codeforces 550A-Two Substrings 题意:给你一个字符串s,你需要判断字符串s中是否含有子串"BA"和"AB",且这两个子串是不重叠的。 思路:对于字符串s,"BAB&q…
2021/12/29 6:07:18 人评论 次浏览 -
【Codeforces】550A-Two Substrings
每天随机做一道CF题并写题解,希望有朝一日能拿块牌子(rating:1300~1800) 原题链接:Codeforces 550A-Two Substrings 题意:给你一个字符串s,你需要判断字符串s中是否含有子串"BA"和"AB",且这两个子串是不重叠的。 思路:对于字符串s,"BAB&q…
2021/12/29 6:07:18 人评论 次浏览 -
JavaScript——制作一个页面电子时钟
题目:页面上有一个电子时钟,显示当前的年月日,时分秒,要求自动变化,双位显示,例如:九点九分九秒,显示为09:09:09 代码:<!DOCTYPE html> <html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-…
2021/12/26 14:07:12 人评论 次浏览 -
JavaScript——制作一个页面电子时钟
题目:页面上有一个电子时钟,显示当前的年月日,时分秒,要求自动变化,双位显示,例如:九点九分九秒,显示为09:09:09 代码:<!DOCTYPE html> <html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-…
2021/12/26 14:07:12 人评论 次浏览 -
双指针-two pointer
18. 4SumMediumGiven an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that:0 <= a, b, c, d < n a, b, c, and d are distinct. nums[a] + nums[b] + nums[c] + nums[d] == targetYou may…
2021/12/26 6:07:12 人评论 次浏览 -
双指针-two pointer
18. 4SumMediumGiven an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that:0 <= a, b, c, d < n a, b, c, and d are distinct. nums[a] + nums[b] + nums[c] + nums[d] == targetYou may…
2021/12/26 6:07:12 人评论 次浏览