1074 宇宙无敌加法器 (20分) https://pintia.cn/problem-sets/994805260223102976/problems/994805263297527808 第一次提交测试五没过:如果和为0,去0的时候保证要留下一个0(测试点5) 第二次AC: 1 #includ ...
分类:
其他好文 时间:
2020-01-17 23:23:06
阅读次数:
75
一、问题 https://leetcode-cn.com/problems/move-zeroes/ 给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。 示例: 输入: [0,1,0,3,12] 输出: [1,3,12,0,0] 说明: 必须在原数组上操作 ...
分类:
移动开发 时间:
2020-01-17 16:18:34
阅读次数:
106
https://pintia.cn/problem-sets/12/problems/348 1 struct complex multiply(struct complex x, struct complex y) 2 { 3 struct complex ret; 4 5 ret.real = ...
分类:
其他好文 时间:
2020-01-17 13:55:22
阅读次数:
117
原题链接在这里:https://leetcode.com/problems/reaching-points/ 题目: A move consists of taking a point (x, y) and transforming it to either (x, x+y) or (x+y, y) ...
分类:
其他好文 时间:
2020-01-17 13:51:06
阅读次数:
117
https://pintia.cn/problem-sets/12/problems/349 1 int set_grade(struct student *p, int n) 2 { 3 int i, count; 4 5 count = 0; 6 for (i = 0; i < n; i++) ...
分类:
其他好文 时间:
2020-01-17 13:13:39
阅读次数:
256
原题链接在这里:https://leetcode.com/problems/asteroid-collision/ 题目: We are given an array asteroids of integers representing asteroids in a row. For each as ...
分类:
其他好文 时间:
2020-01-17 13:13:01
阅读次数:
61
原题链接在这里:https://leetcode.com/problems/shortest-way-to-form-string/ 题目: From any string, we can form a subsequence of that string by deleting some numb ...
分类:
其他好文 时间:
2020-01-17 10:01:32
阅读次数:
91
原题链接在这里:https://leetcode.com/problems/campus-bikes-ii/ 题目: On a campus represented as a 2D grid, there are N workers and M bikes, with N <= M. Each wo ...
分类:
其他好文 时间:
2020-01-17 09:23:42
阅读次数:
104
1. 两数之和 https://leetcode cn.com/problems/two sum/ | 难度 | 完成日期 | 耗时 | 提交次数 | | | | | | | 简单 | 2020 1 16 | 0.5小时 | | 问题描述 给定一个整数数组 nums 和一个目标值 target,请你 ...
分类:
其他好文 时间:
2020-01-17 00:18:10
阅读次数:
83
1078 字符串压缩与解压 (20分) https://pintia.cn/problem-sets/994805260223102976/problems/994805262018265088 1 #include <cstdio> 2 #include <cstring> 3 #include ...
分类:
其他好文 时间:
2020-01-16 23:44:37
阅读次数:
83