programming provincial collegiate sponsored
JavaScript program to check if a given year is leap year Javascript判断是否是闰年
A year is leap year if following conditions are satisfied: Year is multiple of 400. Year is multiple of 4 and not multiple of 100. Approach: Get the v ......
QNX-9—QNX官网文档翻译—Programming Overview
注:翻译网址QNX Software Development Platform --> Programming --> Programmer's Guide --> Programming Overviewhttps://www.qnx.com/developers/docs/7.1/index.h ......
Counting principle and Program Testing
# Reference https://www.shuxuele.com/data/basic-counting-principle.html # 基本计数原理 若有m个方法去做一件事,及n个方法去做另一件事, 则有m×n个方法去做这两件事。 # 应用场景 这个原理只适合在所有选择都是独立时才适用。 ......
【C】专家编程 (Expert C Programming) 阅读笔记
第一章 C:穿越时空的迷雾 1 p22 ~ 24 ANSI C 有此问题。 “安静”的类型转换原则:当执行算术运算时,操作数的类型如果不同,就会发生转换。数据类型一般朝着浮点精度更高,长度更长的方向转换,整形术如果转换为 singed 不会丢失信息,就转换为 signed,否则转换为 unsigne ......
关于xfs文件系统-在操作系统中遇到两个uuid一样的-挂载报错-wrong fs type, bad option, bad superblock on /dev/nvme2n1, missing codepage or helper program, or other error
当操作系统中,出现了两个uuid一样的文件系统(笔者这里是xfs),那么默认就只能挂载成功一个 [root@qq-5201351 ~]# blkid |grep xfs |grep 1ea9e784-0692-403c-bed1-bf34a5a86a57 /dev/nvme1n1: UUID="1e ......
Dynamic Programming
Description Usually, One-dimensional dynamic planning problem, the parameter is always $n$, the result is similar to number sequence $a_n$, or $f(n)$( ......
UNIQUE VISION Programming Contest 2023 New Year (AtCoder Beginner Contest 287) ABCDE
# [UNIQUE VISION Programming Contest 2023 New Year (AtCoder Beginner Contest 287)](https://atcoder.jp/contests/abc287) ## A - Majority ### Problem Sta ......
Running Additional Programs at Boot Time (开机启动)
https://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-boot-init-shutdown-run-boot.html The /etc/rc.d/rc.local script is executed by the init ......
Programming: elimination array duplicate
JavaScript 1. splice let arr = [1, 2, 3, 5, 6, 4, 3, 2, 1, 1, 2, 3, 4, 5] for(let i = 0; i < arr.length - 1; ++i) { for(let j = i + 1; j < arr.length; ......
Programming: Sort
JavaScript let arr = [8, 4, 3, 2, 6, 7, 1, 5, 9] function quickSort(arr) { console.log(arr) if(arr.length <= 1) return arr let midIndex = parseInt(arr ......
SMU Spring 2023 Contest Round 5(2023 (ICPC) Jiangxi Provincial Contest -- Official Contest)
题目链接 Problem A. Drill Wood to Make Fire S * V >= n即可 #include<bits/stdc++.h> #define int long long #define endl '\n' using namespace std; const int N ......
2022 Shanghai Collegiate Programming Contest
# A. Another A+B Problem 暴力枚举出所有的情况,然后特判一下 ```cpp #include using namespace std; set res; int t; string a , b , c = "????????"; #define f(d) ((d[0]-'0' ......
bat脚本在C:\Program Files (x86)使用普通权限运行与使用管理员权限运行获取当前路径的差异
bat脚本在C:\Program Files (x86)使用管理员权限运行获取当前路径不对。 bat脚本如下: @echo off set "current_dir=%cd%" echo Current directory: %current_dir% set "filepath=%current_ ......
The 2023 Guangdong Provincial Collegiate Programming Contest
# A - 算法竞赛 ```cpp #include using namespace std; #define int long long void solve(){ int st , n , ed; cin >> st >> n; map cnt; for( int i = 1 , x ; i > ......
Programming: loop
while initialize test change operation change, test, operation's order will affect the first line number ......
Focus On 3D Terrain Programming三维地形渲染-Trent Polack-2003
前言:你有多少次访问过你最喜欢的编程论坛或邮件列表,并对大量关于地形渲染算法的帖子感到惊讶,这些帖子似乎从各个角度向你袭来?地形渲染似乎是当今业余程序员最喜欢的主题;它是一个很好的门户网站,可以了解更高要求的问题及其解决方案。然而,地形渲染决不是一个简单的问题,特定的解决方案可能会变得相当复杂。来自 ......
Programming: print
find out diagonal for(let b = 1; b <= 9; ++b) { let res = '' for(let p = 1; p <= 9; ++p) { if(b > p) res += ' ' else res += '*' } console.log(res) } f ......
Basics of Neural Network Programming
[TOC] # Basics of Neural Network Programming ## Logistic Regression given x , want $\hat{y}=P(y=1|x)$, $x\in\R^{n_x}$ > $\hat{y_1}=w_{11}*x_{11}+w_{12 ......
2023 CCPC Henan Provincial Collegiate Programming Contest
链接:[https://codeforces.com/gym/104354](https://codeforces.com/gym/104354) ## A. 小水獭游河南 使用 $\text{hash}$,$O(\sum n)$。 C++ Code ```cpp #include "bits/st ......
2023 (ICPC) Jiangxi Provincial Contest -- Official Contest
2023 (ICPC) Jiangxi Provincial Contest -- Official Contest A - Drill Wood to Make Fire 思路:n>=s*v B - Wonderful Array 思路:对a进行a%m,不会对结果造成影响,则0<=bi+1-bi< ......
python:Error: EPERM: operation not permitted, mkdir 'F:\Program Files\nodejs\node_global\node_modules'报错
可以发现文件没有权限 npm ERR! Error: EPERM: operation not permitted, mkdir 'F:\Program Files\nodejs\node_global\node_modules' 将nodejs的文件权限改为完全控制 之后操作即可 ......
Windows开机弹窗 Program 无法启动
Windows任务管理器启动项出现无效项目Program删除方法 软件卸载异常,启动项没有被删除电脑启动会出现 弹窗显示 有Program无效的情况。因为任务管理器启动项有无效的启动项,删除即可。 解决方法用户启动项计算机\HKEY_CURRENT_USER\Software\Microsoft\W ......
python:Error: EPERM: operation not permitted, mkdir 'F:\Program Files\nodejs\node_global\node_modules'报错
可以发现文件没有权限 npm ERR! Error: EPERM: operation not permitted, mkdir 'F:\Program Files\nodejs\node_global\node_modules' 将nodejs的文件权限改为完全控制 之后操作即可 ......
2023 Xian Jiaotong University Programming Contest
A.大水题 #include <bits/stdc++.h> #include <ext/rope> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_cxx; using name ......
2023 CCPC Henan Provincial Collegiate Programming Contest
因为是我和队友VP的这场比赛,最后记录的也是比赛时候的提交代码,因此会出现多种不同的码风也是正常现象。 A.小水獭游河南 #include<bits/stdc++.h> using namespace std; #define rg register #define maxn 150500 #def ......
2023 Hubei Provincial Collegiate Programming Contest
记录一下和队友VP的这场湖北省赛,有空会加上赛后自己的复盘分析和补题情况。 C.Darkness I #include<bits/stdc++.h> using namespace std; #define rg register #define maxn 105050 #define int lo ......
2023 Hubei Provincial Collegiate Programming Contest(gym104337)A. Prime Magic
# 题目大意 给出一个数列ai,每次可以选择**一个区间**[l,r]进行**全体+1**或**全体-1**,需要满足**区间长度len=r-l+1为奇质数p**,且操作过程中ai非负 求最少操作次数使得最终ai不减 n=0 发现原操作等于**选择一个奇质数p**,对b[i]+x,b[i+p]-x ......
2023 Hubei Provincial Collegiate Programming Contest(gym104337)I. Step
# 题目大意 给出数列p[i],求**最小的x**使得$\forall i,(x+1)x/2\%p_i=0$ 保证lcm(p[i]) using namespace std; typedef long long LL; const int N=10001000; int n; int prime[N ......
2023 Hubei Provincial Collegiate Programming Contest(gym104337)E. Inverse Counting Path
# 题目大意 构造一个01网格图,1能走0不能走 使得从左上走到右下(只能走右或走下)的方案数恰好为x n=当前p[i]就减p[i],a[i]+1(也类似**进制转换**) (也可以理解成让**ai尽量小**,所以一次**减的数尽量大**,每次**减最大的能减的数** # code ```cpp # ......