contest programming beginner registry

AtCoder Regular Contest 158 D - Equation

题目链接 原本看着式子直接晕了,觉得是高深的硬核数论,于是放弃(然后E也没想出来,sad) 关键的思路在于,考虑构造由**(a,b,c)->(ta,tb,tc)**这样的求解方式。 在看到这个做法后,会发现它很好地利用了题目齐次的性质;至于如何由齐次式想到这个做法,可能需要足够的天赋或者经验吧(悲) ......
Equation AtCoder Regular Contest 158

SMU Spring 2023 Trial Contest Round 4 (4.4)

SMU Spring 2023 Trial Contest Round 4 (^_^) A小石的图形 思路:pi=acos(-1) #include<bits/stdc++.h> using namespace std; typedef pair<int,int>PII; const int N=1 ......
Contest Spring Round Trial 2023

AtCoder Beginner Contest 294(E,F,G)

AtCoder Beginner Contest 294(E,F,G) E (思维,双指针) E 这个题的大意就是有一个$2$行$L$列的网格,每个格子里面都有不同的数字,但是它的输入方式不是一个一个输入的,而是从第一个开始,枚举每个数在这一段的数量,(比如$a_1=2,L_1=3$,那么此时就已经 ......
Beginner AtCoder Contest 294

[Leetcode Weekly Contest]339

链接:LeetCode [Leetcode]2609. 最长平衡子字符串 给你一个仅由 0 和 1 组成的二进制字符串 s 。 如果子字符串中 所有的 0 都在 1 之前 且其中 0 的数量等于 1 的数量,则认为 s 的这个子字符串是平衡子字符串。请注意,空子字符串也视作平衡子字符串。 返回 s ......
Leetcode Contest Weekly 339

AtCoder Beginner Contest 154

AtCoder Beginner Contest 154 https://atcoder.jp/contests/abc154 今天也比较简单。 E - Almost Everywhere Zero 贪心或者数位dp。 (其实我这个贪心应该就是在模拟数位dp) 贪心 #include <bits/s ......
Beginner AtCoder Contest 154

AtCoder Beginner Contest 296

AtCoder Beginner Contest 296 比赛连接 好久没写题解了~~ D - M<=ab 题意就是给定N,M, 求一个最小的数x同时满足x>=M且x=a*b(a<=N,b<=N); N,M<=1e12 开始脑瘫想了二分,仔细一想很明显x不满足单调性,想了下暴力的时间复杂度巨大... ......
Beginner AtCoder Contest 296

AtCoder Beginner Contest 144

AtCoder Beginner Contest 144 https://atcoder.jp/contests/abc144 补一下3.23做的。 D - Water Bottle 分类讨论,三角函数。 #include <bits/stdc++.h> #define pi acos (-1) u ......
Beginner AtCoder Contest 144

AtCoder Beginner Contest 296 A-E

AtCoder Beginner Contest 296 A - Alternately 1 void solve(){ 2 int n=read(); 3 string s; 4 cin>>s; 5 int ans=1; 6 for(int i=0;i<s.size()-1;i++){ 7 if( ......
Beginner AtCoder Contest 296 A-E

AtCoder Beginner Contest 296

AtCoder Beginner Contest 296 赛时代码 A - Alternately // Problem: A - Alternately // Contest: AtCoder - AtCoder Beginner Contest 296 // URL: https://atcod ......
Beginner AtCoder Contest 296

AtCoder Beginner Contest 296 做题记录

D - M<=ab 题意:求最小的正整数,不小于 $m$,且能被表示为两个不大于 $n$ 的正整数的数,不存在输出 -1。$n,m\le10^{12}$。 直接枚举 $a$,计算最小的满足 $ab\ge m$ 的 $b$,如果 $a>b$ 则后面的情况一定是重复的。时间复杂度 $\text{O}(\ ......
Beginner AtCoder Contest 296

AtCoder Beginner Contest 153

AtCoder Beginner Contest 153 https://atcoder.jp/contests/abc153 这套比较简单。 E - Crested Ibis vs Monster 完全背包 #include <bits/stdc++.h> #define ll long long ......
Beginner AtCoder Contest 153

AtCoder Beginner Contest 296

E Transition Game 拓扑跑环。 C++ Code #include "bits/stdc++.h" using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false); cin.ti ......
Beginner AtCoder Contest 296

AtCoder Beginner Contest 296 ABCD

https://atcoder.jp/contests/abc296 ###A - Alternately #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> PII; cons ......
Beginner AtCoder Contest ABCD 296

AtCoder Beginner Contest 296

295? 上周ECF玩去了,咕咕咕 A - Alternately (abc296 a) 题目大意 给定一个包含$MF$的字符串,问是否是 $M,F$交替出现的。 解题思路 判断相邻字母是否相等即可。 神奇的代码 ```cpp #include using namespace std; using ......
Beginner AtCoder Contest 296

docker笔记-安装、操作和Registry

注意事项 强烈建议docker宿主机关闭firewalld,改用iptables 1 docker安装 1.1 离线安装 下载 Docker 二进制文件(https://download.docker.com/linux/static/stable/x86_64/) tar zxf docker-x ......
Registry 笔记 docker

AtCoder Beginner Contest 152

AtCoder Beginner Contest 152 https://atcoder.jp/contests/abc152 F我看了半天,编码方式那里还算是感觉比较玄乎,这题确实妙。 D - Handstand 2 只需记录两端数字即可,不要想太复杂。 #include <bits/stdc++ ......
Beginner AtCoder Contest 152

sqlserver 2012打开失败"状态代码 0x10。原因: Unable to retrieve registry settings from TCP/IP protocol's 'IPAll' configuration key. The data is invalid."解决方法

今天阿里云服务器上的sqlserver突然打不开了,尝试去打开服务,报这个错: 请求失败或服务未及时响应,有关详细信息,请参见事件日志或其他适用的错误日志。 于是我就去查看错误日志,错误原因为: TDSSNIClient 初始化失败,出现错误 0xd,状态代码 0x10。原因: Unable to ......
quot configuration sqlserver 39 protocol

AtCoder Beginner Contest 295

题解报告 基本的一些理解和问题都在注释中 A:Probably English //水题 #include <cstdio> #include <iostream> #include <algorithm> #include <cstring> #include <string> #include ......
Beginner AtCoder Contest 295

AtCoder Beginner Contest 151

AtCoder Beginner Contest 151 https://atcoder.jp/contests/abc151 这一套质量一般 E - Max-Min Sums 组合数学 #include <bits/stdc++.h> #define ll long long using name ......
Beginner AtCoder Contest 151

【vue : 无法加载文件 G:\Program Files\nodejs\vue.ps1,因为在此系统上禁止运行脚本】问题解决

问题 全局安装vue-cli后,安装没问题,但是执行vue -V查看版本时出问题 出现这个报错的原因:在电脑上启动 Windows PowerShell 时,执行策略极大可能是 Restricted(默认设置)。Restricted 策略不允许任何脚本运行,防止执行不信任的脚本。 解决问题 1、可以 ......
脚本 vue Program 文件 nodejs

AtCoder Beginner Contest 150

AtCoder Beginner Contest 150 https://atcoder.jp/contests/abc150 def都蛮不错的 D - Semi Common Multiple 先推一下:$x=a_i\times(p+0.5)\rightarrow x=\frac{a_i}2(2p ......
Beginner AtCoder Contest 150

AtCoder Beginner Contest 149

AtCoder Beginner Contest 149 https://atcoder.jp/contests/abc149 D - Prediction and Restriction 读题的锅!!没说输了要扣分!!! 两种做法。 贪心 对于相同格子 $i,i+k,i+2k,...$ 采取赢,平 ......
Beginner AtCoder Contest 149

[Algorithm] Dynamic programming - 02 - Longest Common Subsequence - Drawing 2d matrix + back tracing

Write a function that takes in two strings and returns their longest common subsequence. A subsequence of a string is a set of characters that aren't ......

AtCoder Beginner Contest 245

A - Good morning #include <bits/stdc++.h> using namespace std; int32_t main() { int a , b , c , d; int ta , ao; cin >> a >> b >> c >> d; ta = a * 60 * ......
Beginner AtCoder Contest 245

AtCoder Beginner Contest 246

AtCoder Beginner Contest 246 A (思维) A 这个题大意是告诉你一个矩形的三个点,求第四个点,并且已知每条边都是平行于$x$轴或者是$y$轴的,那么我们可以确定,$x$坐标只有两种,并且每一种都有两个,$y$坐标也是 题目输入三个坐标,那么答案就是缺少的那个个(数量为$ ......
Beginner AtCoder Contest 246

Go Expert Programming之iota

前言 iota常用于const表达式中,且其值是从零开始,const声明块中每增加一行iota值自增1。 使用iota可以简化常量定义,但其规则必须要牢牢掌握,否则在我们阅读别人源码时可能会造成误解或障碍。本节我们尝试全面的总结其使用场景,另外花一小部分时间看一下其实现原理,从原理上把握可以更深刻的 ......
Programming Expert iota Go

AtCoder Beginner Contest 295

A - Probably English #include <bits/stdc++.h> using namespace std; int read() { int x = 0, f = 1, ch = getchar(); while ((ch < '0' || ch > '9') && ch ......
Beginner AtCoder Contest 295

nowcoder contest/911/F

https://ac.nowcoder.com/acm/contest/911/F 值域上维护右括号的个数,遇到左括号就查询前面有几个右括号 #include <iostream> #include <algorithm> #include <queue> using namespace std ; ......
nowcoder contest 911

Coinc1dens's lessons for cryptography beginner

Coinc1dens's lessons for cryptography beginner 10分题懒得写,赛后浅写一下(有些还真写不出来)太屑了 古典懒得写,相信都写的出来 1.child exgcd i 即为m在模p情况下的乘法逆元,反着求i在模p下的乘法逆元即可。 2.child_quadr ......

[Algorithm] Dynamic programming - 01 - Drawing 2-d matrix

Problem: Levenshtein Distance Write a function that takes in two strings and returns the minimum number of edit operations that need to be performed o ......
programming Algorithm Dynamic Drawing matrix