![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
编程练习
Hey__Juude
这个作者很懒,什么都没留下…
展开
-
tyvj1005 未进行测试
#includeusing namespace std;int value[1000];int time[1000];int max(int a, int b){if (a > b)return a;else return b;}int Tvalue(int Ltime, int num){if (num == 0){if (Ltim原创 2016-11-16 23:25:33 · 199 阅读 · 0 评论 -
LeetCode练习记录2017/12/8
【566】Reshape the Matrixclass Solution {public: vector> matrixReshape(vector>& nums, int r, int c) { int total = 0; int a = nums.size(); int b = nums[0].size(); for(int i=0;i<nums.size();原创 2017-12-08 21:18:57 · 156 阅读 · 0 评论 -
LeetCode练习记录2017/12/9
【406】Queue Reconstruciton by Heightclass Solution {public: vector> reconstructQueue(vector>& people) { vector>result; if (people.empty()) return result; sort(people.begin(), people.end(),原创 2017-12-09 20:30:21 · 127 阅读 · 0 评论 -
poj2388
#include#includeusing namespace std;void qsort(int,int);int arr[10000] = { 0 };int n = 0;int main(){cin >> n;int temp;for(int i=0;i{cin >> temp;arr[i] = temp;}qso原创 2017-07-14 17:29:17 · 345 阅读 · 0 评论 -
poj1035
#include#includeusing namespace std;string dic[10000];int diclength = 0;string word;string che[50];int chelength = 0;string matched[50] = {""};void check();int main(){w原创 2017-05-27 19:13:40 · 284 阅读 · 0 评论 -
poj1016
#include#includeusing namespace std;string record[16] = {""};string num;int main(){cin >> num;while (num != "-1"){int cha = 0;int sta = 0;record[0] = num;for(int原创 2017-05-26 18:32:08 · 207 阅读 · 0 评论 -
poj 1328
#include#include#include#includeusing namespace std;struct dot{int x;int y;}abc[10000];struct rad{float left;float right;}rads[10000];int comp(const void* a,原创 2017-05-25 18:36:10 · 174 阅读 · 0 评论 -
poj 1207
#includeint main(){int i, j, maxi, max;while (scanf("%d%d", &i, &j)!=EOF){int sma, lar;max = 0;if (i > j){sma = j;lar = i;}else {sma = i;lar = j;}for (int fla原创 2017-05-11 21:00:34 · 194 阅读 · 0 评论 -
poj 1005
#include#include#define PI 3.1415926int main(){int N;scanf("%d", &N);float a;float b;float area;int Z;int i;for (i = 1; i {scanf("%f%f", &a, &b);area = PI / 2 * (pow(原创 2017-05-11 20:16:59 · 167 阅读 · 0 评论 -
poj 1004
#includeint main(){float bal[12] = { 0 }, ave=0;int i=0;while (i{ave += bal[i];i++;}ave /= 12.0;printf("$%.2f\n", ave);return 0;}原创 2017-05-11 19:33:01 · 224 阅读 · 0 评论 -
poj 1003
#includeint main(){float a = 1.00f;float sum = 0;int i = 0;while (scanf("%f", &a)&&a) {sum = 0;for (i = 1; i{sum += 1.0 / (i+1);if (sum>= a){printf("%d card(s)\n", i);原创 2017-05-11 17:19:21 · 172 阅读 · 0 评论 -
tyvj 1008 未测试
#includeusing namespace std;int n, m;int dfs(int flag, int timeLeft){if (timeLeft == 0){if (flag == 1)return 1;else return 0;}if (flag == 1){return dfs(n, timeLeft-1) + dfs(2原创 2016-11-28 00:30:01 · 158 阅读 · 0 评论 -
LeetCode练习记录2017/12/10
【136】Single Numberclass Solution {public: int singleNumber(vector& nums) { int result=0; for(int i=0;i<nums.size();i++) { result^=nums[i]; }原创 2017-12-10 20:30:34 · 168 阅读 · 1 评论