A. Requirements

告别混乱!用Cadence Capture CIS高效管理你的原理图库:以单逻辑器件K9F2G08U0M为例 本文以单逻辑器件K9F2G08U0M为例,详细介绍了如何使用Cadence Capture CIS高效管理原理图库。通过三级分类体系、工程化命名规范和智能检索技术,帮助工程师实现从混乱到有序的转变,提升团队协作效率和设计准确性。 阅读详情


A. Requirements
Code (90%)
You can write your code in Java, Python, C, or C++. The time limit may vary among different
languages, depending on the performance of the language. Your code must be a complete excutable
program instead of only a function. We guarantee test data strictly compliance with the requirements
in the description, and you do not need to deal with cases where the input data is invalid.
No AI Assistance or Plagiarism: All code must be your own. The use of AI tools (e.g., ChatGPT,
GitHub Copilot) or copying from external sources or peers is strictly forbidden.
Violations of the plagiarism rules will result in 0 points or even failure of this course.
Libraries in this assignment:
• For C/C++, you can only include standard library.
• For Java, you can only import java.util.*
• For Python, you can only import standard library. In other words, you cannot import libraries
such as numpy.
We provide an example problem to illustrate the information above better.
Report (10%)
You also need to write a report in pdf type to explain the following:
• What are the possible solutions for the problem?
• How do you solve this problem?
• Why is your solution better than others?
Please note that the maximum number of pages allowed for your report is 5 pages.
Remember that the report is to illustrate your thinking process. Keep in mind that your report is
supposed to show your ideas and thinking process. We expect clear and precise textual descriptions
in your report, and we do not recommend that you over-format your report.
B. Example Problem: A + B Problem
Description
Given 2 integers A and B, compute and print A + B
Input
Two integers in one line: A, and B
Output
One integer: A + B
Sample Input 1
1 2
Sample Output 1
3
1Problem Scale & Subtasks
For 100% of the test cases, 0 ≤ A, B ≤ 10
6
Solutions
Java
import java . util .*;
public class Example {
public static void main ( String [] args ) {
int a, b;
Scanner scanner = new Scanner ( System .in );
a = scanner . nextInt ();
b = scanner . nextInt ();
scanner . close ();
System . out . println (a + b);
}
}
Python
AB = input (). split ()
A, B = int (AB [0]) , int (AB [1])
print (A + B)
C
# include <stdio .h>
int main ( int argc , char * argv [])
{
int A, B;
scanf ("%d%d", &A, &B);
printf ("%d\n", A + B);
return 0;
}
C++
# include <iostream >
int main ( int argc , char * argv [])
{
int A, B;
std :: cin >> A >> B;
std :: cout << A + B << std :: endl ;
return 0;
}
C. Submission
After ffnishing this assignment, you are required to submit your code to the Online Judge System
(OJ), and upload your .zip package of your code ffles and report to BlackBoard.
C.1 Online Judge
Once you have completed one problem, you can submit your code on the page on the Online Judge
platform (oj.cuhk.edu.cn, campus only) to gain marks for the code part. You can submit your
solution of one problem for no more than 80 times.
2After you have submitted your program, OJ will test your program on all test cases and give you a
grade. The grade of your latest submission will be regarded as the ffnal grade of the corresponding
problem. Each problem is tested on multiple test cases of different difffculty. You will get a part of
the score even if your algorithm is not the best.
Note: The program running time may vary on different machines. Please refer to the result of
the online judge system. OJ will show the time and memory limits for different languages on the
corresponding problem page.
If you have other questions about the online judge system, please refer to OJ wiki (campus network
only). If this cannot help you, feel free to contact us.
C.2 BlackBoard
You are required to upload your source codes and report to the BlackBoard platform. You need
to name your ffles according to the following rules and compress them into A1_<Student ID>.zip :
A1_ < Student ID >. zip
|-- A1_P1_ < Student ID >. java /py/c/ cpp
|-- A1_P2_ < Student ID >. java /py/c/ cpp
|-- A1_Report_ < Student ID >. pdf
For Java users, you don’t need to consider the consistency of class name and ffle name.
For example, suppose your ID is 123456789, and your problem 1 is written in Python, problem 2 is
written in Java then the following contents should be included in your submitted A1_123456789.zip:
A1_123456789 .zip
|-- A1_P1_123456789 .py
|-- A1_P2_123456789 . java
|-- A1_Report_123456789 . pdf
C.3 Late Submissions
Submissions after Sept. 29 2024 23:59:00(UTC+8) would be considered as LATE.
The LATE submission page will open after deadline on OJ.
Submisson time = max{latest submisson time for every problem, BlackBoard submisson time}
There will be penalties for late submission:
• 0–24 hours after deadline: ffnal score = your score×0.8
• 24–72 hours after deadline: ffnal score = your score×0.5
• 72+ hours after deadline: ffnal score = your score×0
FAQs
Q: My program passes samples on my computer, but not get AC on OJ.
A: Refer to OJ Wiki Q&A
3CSC3100 Data Structures Fall 2024
Programming Assignment 1
Yige Jiang: yigejiang@link.cuhk.edu.cn
Chunxu Lin: 221012033@link.cuhk.edu.cn
Due: Sept. 29 2024 23:59:00
Assignment Link: https://oj.cuhk.edu.cn/d/csc3100_2024_fall/homework/66e704de6605d3c4e7f63c35
1 Array Problem (40% of this assignment)
1.1 Description
You are given a sequence of integers ai of length n. Additionally, you are given m operations to perform
on this sequence. Each operation is one of the following:
- Given k, x, y, c, update the value of ak using the formula:
ak =
(x
2 + ky + 5x) mod P

∗ c
Obviously, the resulting value will be between [1 − P, P − 1], where c = ±1.
- Query the sum of all elements in the sequence, i.e., compute:
Xn
i=1
ai
- Query the maximum number of distinct values in the sequence if each element is multiplied by either
1 or −1 (you can ffip the sign of some elements and count the maximum number of distinct numbers).
Your task is to process these operations efffciently.
1.2 Input
The ffrst line contains three integers n, m and P (1 ≤ n, m ≤ 10
6
, 1 ≤ P ≤ 10
6
) — the length of the
sequence, the number of operations and the divisor in modulo operation, respectively.
The second line contains n integers, representing the original value of the array a, denoted as a1, a2, ..., an
(−P < a[i] < P).
Each of the next m lines contains a description of one of the following types of operations:
- For update operations, the line will contain ffve integers 1, k, x, y, c (1 ≤ k ≤ n, 0 ≤ x, y <
min(P, 2000), c ∈ {−1, 1}).
- For sum queries, the line will contain a single integer 2.
- For distinct value queries, the line will contain a single integer 3.
41.3 Output
For each sum query, output the sum of all elements in the array.
For each distinct value query, output the maximum number of distinct values that can be obtained by
multiplying each element by either 1 or −1.
Sample Input 1
5 5 3
0 0 0 1 -2
3
1 5 1 2 -1
3
1 3 2 1 1
3
Sample Output 1
3
3
4
Sample Input 2
10 10 5
-1 -2 2 -3 2 0 -4 3 3 -3
3
1 2 4 4 -1
2
1 3 1 2 -1
3
2
3
1 2 4 4 1
3
1 4 4 0 -1
Sample Output 2
7
-5
8
-9
8
8
Sample Input 3
in ’ array_sampleinput3 .in ’
Sample Output 3
in ’ array_sampleinput3 .ans ’
Problem Scale & Subtasks
For about 60% test cases, distinct value queries are not evolved.
Test Case No. Constraints
1-4 n, m ≤ 20
5-7 n, m ≤ 5 × 10
3
8-10 n, m ≤ 10
6
Hint
If you encounter a TLE, and your algorithm’s time complexity is efffcient, try optimizing your I/O
operations.
2 List (50% of this assignment)
2.1 Description
Given an array, which is a permutation of size n (an array of size n where every integer from 1 to n
appears exactly once), we perform q operations. During the i-th operation, we perform the following:
• Choose any subarray that contains at least 2 elements.
5• Split it into two non-empty arrays.
• Obtain two integers li and ri
, where li
is the left most element in the left part of the split,
and ri
is the right most element in the right part of the split.
For example, if the initial array is [6, 3, 4, 1, 2, 5], we perform the following operations:
1. Choose the array [6, 3, 4, 1, 2, 5] and split it into [6, 3] and [4, 1, 2, 5]. Then, l1 = 6 and r1 = 5.
2. Choose the array [4, 1, 2, 5] and split it into [4, 1, 2] and [5]. Then, l2 = 4 and r2 = 5, resulting
in the arrays [6, 3], [4, 1, 2], and [5].
3. Choose the array [4, 1, 2] and split it into [4] and [1, 2]. Then, l3 = 4 and r3 = 2, resulting in
the arrays [6, 3], [4], [1, 2], and [5].
Objective. Given two integers n and q, along with two sequences [l1, l2, ..., lq] and [r1, r2, ..., rq], a
permutation is called valid if we can perform q operations and generate the given sequences [l1, l2, ..., lq]
and [r1, r2, ..., rq].
Problem. Determine whether a given permutation with q operations is valid.
2.2 Input
1. The first line contains two integers n and q (1 ≤ q < n ≤ 106
).
2. The second line contains a permutation of size n.
3. The third line contains q integers, l1, l2, ..., lq (1 ≤ li ≤ n).
4. The fourth line contains q integers, r1, r2, ..., rq ( 1 ≤ ri ≤ n )
2.3 Output
Output 1 if the given permutation is valid, otherwise output 0.
Sample Input 1
6 3
6 3 4 1 2 5
6 4 4
5 5 2
Sample Output 1
1
Sample Input 2
7 3
7 6 3 4 1 2 5
6 4 4
5 5 2
Sample Output 2
0
Sample Input 3
7 3
6 3 4 1 2 5 7
6 4 4
5 5 2
Sample Output 3
0
Problem Scale & Subtasks
For 100% of the test cases, 1 ≤ q < n ≤ 106
.
6Test Case No. Constraints
1-2 n ≤ 10
3-5 n ≤ 103
6-10 n ≤ 106
Figure 1: Hint2
Hint
Hint1 : For C/C++ and Java users, an int type stores integers range from -2,147,483,648 to 2,147,483,647.
It may be too small for this problem. You need other data types, such as long long for C/C++ and
long for Java. They store integers ranging from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.
Use scanf("%lld",&n) for C, cin>>n for C++ and n = scanner.nextLong() for Java to get the input
n. And the other operations for long and long long are quite same as int.
Hint2 : The process of Sample Input 1 can be described as in the Figure 1.
Hint3 : This problem can be easily solved by following the above process from bottom to top.
Hint4 : Consider how using the data structure, such as dictionary or list, to store the indices of li and
ri can help solve the problem.

高级数据结构之R树(R-tree) R树(R-tree)是一种将B树扩展到多维情况下得到的数据结构,它最初由Antonin Guttman于1984年提出。B树的结点中会存储一个键的集合,这些键把线分成片段,沿着那条线的点仅属于一个片段。因此,B树使得我们可以很容易地找到点。如果把沿线各处的点表示成B树结点,我们就能够确定点所属唯一子结点,在那里可以找到该点。 Antonin Guttman在他提出R树的经典论文中给出的R树例子... 阅读详情

相关推荐

MATLAB信号处理实战:VMD分解参数调优全指南(附避坑技巧)

本文深入探讨了MATLAB中变分模态分解(VMD)的核心参数调优实战技巧。针对模态数K和惩罚系数α的选择难题,提供了从经验估计、可视化观察到量化指标辅助的渐进式调优框架,并分享了避免过分解与欠分解的实用避坑指南,旨在帮助工程师高效处理非平稳信号,提取清晰的物理特征。

weixin_29079671的博客 146

Android报错META-INF/DEPENDENCIES

3 files found with path 'META-INF/DEPENDENCIES'. Adding a packagingOptions block may help, please refer to https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html for more information 大概意思是:错误:在OS独立路

weixin_54305517的博客 1万+

开关电源拓扑结构选型指南:从Buck到Full-Bridge的实战解析

本文为硬件工程师提供了开关电源拓扑结构的实战选型指南。文章系统解析了从基础的Buck、Boost、Buck-Boost,到隔离型的Flyback、Forward,再到中高功率的半桥、全桥以及高效率的LLC谐振拓扑的适用场景与核心特点。通过对比分析各拓扑的优缺点,并结合输入输出电压、功率等级、成本与效率等关键参数,给出了清晰的选型决策路径,帮助工程师根据具体项目需求选择最合适的电源“骨架”。

weixin_29306261的博客 113

A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction

build失败

qq_36975610的博客 2062

OpenClaw本地部署教程

本文详细介绍了在Windows 11系统上部署OpenClaw与Ollama本地模型的完整流程。主要内容包括:硬件要求说明、Node.js环境配置、Ollama模型安装与定制(重点扩展上下文窗口至32768 tokens)、OpenClaw核心框架安装与对接、常见问题解决(如模型上下文窗口过小报错)以及可选技能扩展和飞书接入方案。部署全程约需1-2小时,强调使用备用设备或虚拟机以确保安全,并提供关键配置参数和排错命令。该方案实现了"数据不出门、推理本地化"的私有化部署目标。

技术引领业务创新 2593

Aloudata 荣登“数智技术系列榜单”和“数据智能服务商 TOP30”

持续助力各行业数智化先进企业突破数据管理技术瓶颈,以更加敏捷、精准和可靠的数据交付驱动企业业务创新与经营提效

Aloudata的博客 672

2 files found with path ‘META-INF/lib_release.kotlin_module’

记录项目开发中遇到的一个问题,防止后续再踩雷:自己封装了一个功能库,库名字叫lib,满心欢喜接入到app 工程。编译打包时却报错:2 files found with path 'META-INF/lib_release.kotlin_module'。

xiaobaaidaba123的专栏 3868

以ATT&CK为例构建网络安全知识图

随着攻击工具、方法的逐渐升级和复杂化,安全数据的大规模融合,攻防对抗愈加激烈。安全团队如何在浩瀚数据中有效发现高级威胁的蛛丝马迹,如何把网络安全专家的经验、知识有效转化为可复制可扩展的数据分析能力,如何将对抗高级威胁的“炼金术”逐步升级为科学淘金指南,如何将安全从业者从繁重的体力劳动中解放出来,愈发成为安全能力亟需突破的难点和重点,也是我们正在探索的方向。正如医疗行业中治疗疑难杂症依赖医疗专家,网络空间高级威胁的防护和处置也依赖安全专家的经验与知识。

2401_88752684的博客 1093

Android Studio编译报错:Adding a packaging block may help, please refer to ******/Packaging

Android Studio 报错排除

casual_clover的博客 654

【2026最新版】python点云处理算法汇总(长期更新版)

python点云处理算法整理。博客长期更新,最近一次更新时间为:2026年10月4日。

点云侠的博客 42万+

13、7自由度机械臂混合逆运动学算法解析

本文介绍了一种针对7自由度机械臂的混合逆运动学算法,通过引入额外参数Φ解决冗余自由度问题,并实现了避障、避免关节超限和扩大工作空间。该方法采用解析逆运动学求解策略,克服了机械臂在奇异位姿时的配置不连续性问题。通过对比实验验证了该算法在腕部关节角度连续性和位姿可达性方面的优越性,同时结合躯干逆运动学显著扩展了机械臂的工作空间。

rgv23456789的博客 238

使用AndroidMail包收邮件时的mergeDebugJavaResource异常处理

依赖包含: implementation 'com.sun.mail:android-mail:1.6.7' implementation 'com.sun.mail:android-activation:1.6.7' 具体错误日志如下: Execution failed for task ':app:mergeDebugJavaResource'. > A failure occurred while executing com.android.build.gradle.i

比特零的专栏 4308

【系统分析师】2026年上半年真题:论文及解题思路

四篇论文围绕系统与开发实践展开: 安全架构设计强调数据加密(国密算法)、零信任访问控制及容灾架构,以某医疗云平台为例,实现RTO<5分钟的高可用保障。 架构风格应用解析微服务/事件驱动等风格选型,结合电商平台案例,通过服务拆分与异步通信提升扩展性。 需求评审机制提出正式评审与走查结合的方法,在金融系统中减少30%返工,解决业务规则二义性问题。 LLM测试生成利用大模型从需求/代码生成用例,辅以人工校验,使测试效率提升50%,覆盖边缘场景。 各篇均遵循“背景-理论-实践”结构,突出

数据知道的博客 787

Users of a Requirements Document

◾ Managers。

技术日常 899

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

Managing Software Requirements: A Unified Approach

版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章原始出版、作者信息和本声明。否则将追究法律责任。http://blog.csdn.net/topmvp - topmvpDespite the wealth of development knowledge, experience, and tools generally available today, a substantial p

TopMVP 1017

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

A Calculator For Advanced Requirements

an advanced calculator

weixin_68846838的博客 173

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

Step 3: Adding Usage Requirements for a Library

请注意,使用此技术,我们的可执行目标使用我们的库时唯一要做的就是调用target_link_libraries()带有库目标的名称。构建一个 INTERFACE名为的库目标tutorial_compiler_flags,并将其指定cxx_std_11为目标编译器功能。接下来,我们需要创建一个接口库,tutorial_compiler_flags然后使用target_compile_features()添加编译器功能 cxx_std_11。不过请注意,使用这种方法,我们可以明确哪些目标需要特定的要求。

m0_46138114的博客 791

Managing Software Requirements: A Use Case Approach, Second Edition

Despite the wealth of development knowledge, experience, and tools available today, a substantial percentage of software projects fail, often because requirements are not correctly determined and defi

TopMVP 861

A simple pattern for requirements analysis

http://www.ibm.com/developerworks/architecture/library/ar-analpat/index.html The pattern Take the following steps to develop a pattern for business stakeholder requirements descriptions: 1...

iteye_8230的博客 152

What Makes a Great Software Requirements Specification?

What Makes a Great Software Requirements Specification?There are many good definitions of System and Software Requirements Specifications that will provide us a good basis upon which we can both ...

weixin_30535565的博客 191

How to Create a Requirements Traceability Matrix

Instructions 1 Create a template. There are many on the web from which to choose. The  project manager, sponsor and decision makers will thank you when they are  receiving information in a

jackzhang083的专栏 594

How to Calculate Video Storage Requirements And a Free Calculator

Free calculator included http://www.kintronics.com/neteye/neteye.html

crfoxzl的专栏 6989

libcxx——algorithm,functionalConcept is a term that describes a named set of requirements for a type.

algorithm: //用tag分配区别对待迭代器不同的序列(可以在内部函数注明或者使用type_trait),对不同类型的迭代器(不同的concepts,不同的操作)有不同的优化 template _ForwardIterator1 __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,

frankwyw的博客 473

CMake官方教程中文翻译 Step 3: Adding Usage Requirements for a Library

鉴于自己破烂的英语,所以把cmake的官方文档用 谷歌翻译 翻译下来方便查看。英语好的同学建议直接去看cmake官方文档(英文)学习:地址 点这里或复制:https://cmake.org/cmake/help/latest/guide/tutorial/index.html谷歌翻译可能有错,此文档的目的仅是加快观看英文官方文档的速度,所以请结合英文官方文档观看。

Coastalforest的博客 1217
上一篇: COMP 636: Web App management simulator
vx___codinghelp
博客等级 码龄2年 778粉丝 101原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值