摘要:
while (l < r) { int mid = l + r >> 1; //(l+r)/2 if (check(mid)) r = mid; // check()判断mid是否满足性质 else l = mid + 1; } while (l < r) { int mid = l + r + 1 阅读全文
摘要:
//作业 public class Main { public static void main(String[] args) { int week = 5; switch (week) { case 1: System.out.println("星期一"); break; case 2: Syst 阅读全文
摘要:
双指针 https://www.luogu.com.cn/problem/list?tag=345 洛谷题目 1 A+B #include <bits/stdc++.h> #define ll long long using namespace std; const int N = 2e5 + 10 阅读全文
摘要:
随机数 import java.util.Random; public class Main { public static void main(String[] args) { Random r = new Random(); int data = r.nextInt(10); //0-9之间的随 阅读全文
摘要:
算法 CF955 1982 https://codeforces.com/contest/1982 1 数学思维 /* 我们无需考虑一直加1,而是加一个数到y的倍数这样简化的去想。 */ #include<bits/stdc++.h> #define int long long using name 阅读全文