Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
interview-questions
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
interview-questions
Commits
69737e47
There was an error fetching the commit references. Please try again later.
Verified
Commit
69737e47
authored
6 years ago
by
Recolic Keghart
Browse files
Options
Downloads
Patches
Plain Diff
tx
parent
758d8bdf
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
t1.cc
+11
-0
11 additions, 0 deletions
t1.cc
t2.cc
+13
-0
13 additions, 0 deletions
t2.cc
t3.cc
+16
-0
16 additions, 0 deletions
t3.cc
with
40 additions
and
0 deletions
t1.cc
+
11
−
0
View file @
69737e47
/*腾讯云计算岗位垃圾笔试题1
*
* 给定一个01组成的字符串,我可以采取一个操作:消去相邻的一对01. 我想知道不断的消去一直到不能消去为止,我最终得到的字符串长度是多少?
*
* 例如: 1000101001 => 10001010 => 001010 => 0010 => 00, 答案是2
*
* 输入:
* 第一行N,字符串长度
* 第二行就是那个字符串。
*/
#include
"rlib.min.hpp"
#include
<algorithm>
...
...
This diff is collapsed.
Click to expand it.
t2.cc
+
13
−
0
View file @
69737e47
/*tx2
*
* 我现在有N种面值的硬币。
* 我现在去菜市场,希望带尽可能少的这些硬币,同时又必须能够凑出[1, M]范围内的任何一个的整数面值。
* 我最少带多少硬币?
*
* 输入:
* M N
* 空格分割的N个整数,表示面值数。
*
* N<1024, M<10^10
*/
#include
"rlib.min.hpp"
#include
<algorithm>
...
...
This diff is collapsed.
Click to expand it.
t3.cc
+
16
−
0
View file @
69737e47
/* tx
*
* 我需要通过一个怪兽谷,这里面依次有N个怪兽
* 每一个怪兽都可以用一定的金币来收买他,这样她就会为你护航。
* 你必须保证,在任何时候,保护你的怪兽的总武力值大于你遇到的这一个怪兽的武力值。
* 求你要通过这个怪兽谷,需要的最少金币数。
*
* 输入:
* N
* N个元素的数组,表示每一个怪兽的武力值。
* N个元素的数组,表示每一个怪兽的价格。
*
* N<1024
*
*/
#include
"rlib.min.hpp"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment