codeforces记忆turtle round

实验6 turtle绘图与python库应用编程体验

实验任务1 task1_1 from turtle import * def moveto(x,y): ''' 画笔移动到坐标(x,y)处 ''' penup() goto(x,y) pendown() def draw(n,size = 100): ''' 绘制边长为size的正n边形 ''' f ......
turtle python

实验6 turtle绘图与python库应用编程体验

实验任务一 task1_1 from turtle import * def move(x,y): penup() goto(x,y) pendown() def draw(n,size= 100): for i in range(n): fd(size) left(360/n) def main( ......
turtle python

实验6 turtle绘图与python库应用编程体验

实验任务1:使用turtle绘制基础图形 task1_1.py 实验源码: 1 from turtle import* 2 3 def move(x, y): 4 penup() 5 goto(x, y) 6 pendown() 7 8 def draw(n, size=100): 9 for i ......
turtle python

实验6 turtle绘图与python库应用编程体验

实验任务1 task1_1.py 1 from turtle import * 2 def move(x, y): 3 penup() 4 goto(x, y) 5 pendown() 6 def draw(n, size = 100): 7 8 for i in range(n): 9 fd(si ......
turtle python

实验6 turtle绘图与python库应用编程体验

任务1 from turtle import* def move(x,y): penup() goto(x,y) pendown() def draw(n,size=100): for i in range(n): fd(size) left(360/n) def main(): pensize(2 ......
turtle python

c++中正确使用round()来四舍五入计算

说明四舍五入的函数参数可以有多种数据类型。不同的数据类型有不同的结果。当他的参数应该是浮点数的时候,结果才是真正的四舍五入。 例子 /* g++ -g -std=c++17 ./src/basic_demo.cpp -o basic_demo */ #include <iostream> #incl ......
round

实验6 turtle绘图与python库应用编程体验

task1_1 from turtle import * def move(x,y): penup() goto(x,y) pendown() def draw(n,size=100): for i in range(n): fd(size) left(360/n) def main(): pens ......
turtle python

NSSCTF_Round13 web

flask?jwt? 1.信息收集 题目提示 这里告诉了这题涉及的内容 2.开始探索 (1)发现有注册,有忘记密码 然后这里尝试admin登录,但失败 所以直接注册一个用户 (2)注册后登录 给出页面,点了拿flag,访问/getFlag路由 但是告诉不是admin 然后根据题目信息里的提示应该就需 ......
NSSCTF_Round NSSCTF Round web 13

Codeforces Round 876 (Div. 2)

# Preface DP腐乳闪总出列! (本来以为大掉分的一把,但这个号因为挺新的所以竟然还能上挺多分的,压线完成了5场上紫) 早知道去做E题了,感觉CF真得要看题目相性,有些题目就是一眼感觉不适合自己的说 # A. The Good Array 一个要动点脑子的签到题,因为$a_1,a_n$必须等 ......
Codeforces Round 876 Div

NSSCTF Round#13 web专项

### rank:3 ## flask?jwt? 简单的注册个账号,在`/changePassword ` 下查看页面源代码发现密钥`` ,很好,老套路了,flask-session-cookie-manager伪造,把`_user_id` 改成1,访问`/getFlag` ,拿到flag ## e ......
专项 NSSCTF Round web 13

Codeforces Round 876 (Div. 2)题解

# [Codeforces Round 876 (Div. 2)](https://codeforc.es/contest/1839 "Codeforces Round 876 (Div. 2)") ## [A. The Good Array](https://codeforc.es/contest ......
题解 Codeforces Round 876 Div

2023.5 codeforces 杂题选做

## 2023.5 codeforces 杂题选做 #### [E. Location](https://codeforces.com/contest/1732/problem/E) $n\le 5\times 10^4$ 的范围,并且区间赋值、区间维护最值,可以考虑分块。然后对于散块的修改可以直接 ......
codeforces 2023.5 2023

记忆力

1. 2. 3. ......
记忆力 记忆

CSSYZ Algorithm Round #2

# [ABC192F] Potion ## 分析 设选择的总和为 $sum$。 不难发现: $x\%k=sum\%k$。 又因为: $ans=(x-sum)/k$。 不难发现$sum$只与$\%k$有关,且当$k$一定时,$sum$越大,$ans$越小。 因为$k$的值域很小,显然可以对于每一个$k ......
Algorithm CSSYZ Round

Codeforces 1833E Round Dance

看到 `shortest paths` 来做的,但是好像没啥关系也没啥难度。 首先能知道一个连通块肯定一次就能跳完,所以可以把连通块缩出来。 然后有一个性质,记 $cz_i$ 为 $i$ 连通块内点种通过已知边推出的度数为 $1$ 的个数为 $cz_i$,则 $cz_i\bmod 2 = 0$。 记 ......
Codeforces 1833E Round Dance 1833

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 ......
Contest 2023 Provincial Official Jiangxi

SMU Spring 2023 Contest Round 4(第 21 届上海大学程序设计联赛 春季赛)

A. Antiamuny wants to learn binary search 签到题. #include <map> #include <set> #include <cmath> #include <queue> #include <stack> #include <cstdio> #inc ......
程序设计 联赛 Contest 程序 Spring

Codeforces 1515I - Phoenix and Diamonds(值域倍增+线段树)

首先 $c$ 很大,因此复杂度跟 $c$ 有关的项肯定只能是 $\log c$ 之类的。 类比 IOI2021 dungeons 的套路,我们**对值域进行分层**,假设 $c\in[2^{\omega-1},2^{\omega})$,考虑令重量在 $\ge 2^{\omega-1}$ 的物品为“重 ......
值域 线段 Codeforces Diamonds Phoenix

SMU Spring 2023 Trial Contest Round 11

A. The Text Splitting 题意:给出字符串长度,给出p和q两种切割方式,任选其中一种,把字符串分割输出结果。 题解:先进行判断,p和q是否能整个的分割n,利用p和q的函数关系判断(见代码),再计算有几个p几个q,再进行输出即可 void solve() { cin >> n >> ......
Contest Spring Round Trial 2023

6573: 天才的记忆 RMQ

描述 从前有个人名叫 W and N and B,他有着天才般的记忆力,他珍藏了许多许多的宝藏。在他离世之后留给后人一个难题(专门考验记忆力的啊!),如果谁能轻松回答出这个问题,便可以继承他的宝藏。 题目是这样的:给你一大串数字(编号为 1 到 N,大小可不一定哦!),在你看过一遍之后,它便消失在你 ......
天才 记忆 6573 RMQ

Round-Robin轮询调度法及其实现原理

轮询调度算法(Round-Robin Scheduling) 轮询调度算法的原理是每一次把来自用户的请求轮流分配给内部中的服务器,从1开始,直到N(内部服务器个数),然后重新开始循环。 算法的优点是其简洁性,它无需记录当前所有连接的状态,所以它是一种无状态调度。 轮询调度算法流程 假设有一组服务器N ......
Round-Robin 原理 Round Robin

在树莓派上实现numpy的LSTM长短期记忆神经网络做图像分类,加载pytorch的模型参数,推理mnist手写数字识别

这几天又在玩树莓派,先是搞了个物联网,又在尝试在树莓派上搞一些简单的神经网络,这次搞得是LSTM识别mnist手写数字识别 训练代码在电脑上,cpu就能训练,很快的: import torch import torch.nn as nn import torchvision import numpy ......
树莓 神经网络 长短 模型 图像

Codeforces Round 875 (Div. 2)B-D

原题链接:https://codeforces.com/contest/1831 原文:https://www.cnblogs.com/edgrass/p/17440602.html (B) Array merging 主体思想是找到ab数组的最长相同字串(c中操作可实现连续) 1 #include ......
Codeforces Round 875 B-D Div

Educational Codeforces Round 149 (Rated for Div. 2)

# A. Grasshopper on a Line ```cpp #include using namespace std; #define int long long void solve(){ int x , k; cin >> x >> k; if( x % k == 0 ){ cout > ......
Educational Codeforces Round Rated 149

「闲话随笔」「DROI」Round 2

# 「闲话随笔」「DROI」Round 2 点击查看目录 > [TOC] 题挺好玩的。 ## [P9373 「DROI」Round 2 构造与取模](https://www.luogu.com.cn/problem/P9373) 发现 $k, n - k$ 即为一组正确构造,$k \ge n - k ......
随笔 Round DROI

记忆化搜索的状态初始化问题

初始化1: LC576class Solution { int MOD=(int)(1e9 + 7); int[][][] memo; int m,n; int[][] dir=new int[][]{{-1,0},{0,1},{1,0},{0,-1}}; public int findPaths( ......
状态 记忆 问题

Codeforces Round 875 (Div. 2) 题解 A ~ D

## [A](https://codeforces.com/contest/1831/problem/A). Twin Permutations ### 题目大意 题目给定一个 $1\sim n$ 的排列 $a$ ,现在想求一个排列 $b$, 使得对于 $i #include #include #d ......
题解 Codeforces Round 875 Div

Codeforces Round 875 (Div. 2) A-D

## A. Twin Permutations 题意:给出一个由[1,2,...,n]组成的数组a,构造另一个由[1,2,...,n]组成的数组b,使得a[1]+b[1]>n; for(int i=1;i>a[i]; } for(int i=1;i>n; for(int i=1;i>a[i]; fo ......
Codeforces Round 875 A-D Div

Codeforces Round 875 (Div

# Codeforces Round 875 (Div. 2) C-D题解 ### C [Problem - C - Codeforces](https://codeforces.com/contest/1831/problem/C) 我们发现题述所形成的父亲节点一定比子节点先画出,并且如果子节点顺 ......
Codeforces Round 875 Div

Codeforces Round 875 (Div. 2)

# Preface 难得现场打一次,这天下午打了三个半小时的校内赛,然后八点打了两小时ARC,最后再接上两个半小时的CF真是爽歪歪 不过有一说一其实很多时候都在坐牢,这场CF也差不多,一个小时写完ABCD然后开始坐牢,其实E基本想出来了但是没想到用随机赋值的方法来实现 不过由于这场手很稳因此排名极高 ......
Codeforces Round 875 Div