-
C - C **Time Limit:**1000MS **Memory Limit:**262144KB 64bit IO Format:%I64d & %I64u Submit Status Description Permutation_p_ is an ordered set of integers _p_1, p_2, ..., p__n, consisting of n distinct positive integers not larger than n. We'll denote as_n the length of permutation _p_1, _p_2, ..., p__n. Your task …
Read More -
http://codeforces.com/problemset/problem/479/C 1/************************************************ 2Author :111qqz 3Created Time :2016年02月22日 星期一 23时31分10秒 4File Name :code/cf/problem/479C.cpp 5************************************************ */ 6 7#include <iostream>8#include <algorithm>9#include …
Read More -
ZCC Loves Codefires Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 988 Accepted Submission(s): 500 Problem Description Though ZCC has many Fans, ZCC himself is a crazy Fan of a coder, called "Memset137". It was on Codefires(CF), an online competitive …
Read More -
Wooden Sticks Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 19008 Accepted: 8012 Description There is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one by one fashion. It needs some time, called setup time, …
Read More -
简单贪心。 因为填的字母没有次数限制,所以最优策略很容易想到,就是在最后面填最大的。 不用实际去填,算出ans就可以。 1 2 3 4 #include <iostream>5 #include <cmath>6 #include <cstring>7 #include <algorithm>8 9 using namespace std; 10 11 int main() 12 { 13 int k,len; 14 char st[2000]; 15 int a[2000]; 16 memset(a,0,sizeof(a)); 17 int w[50]; 18 …
Read More -
简单贪心.... 需要注意的是数据是非负,所以有0的情况要考虑周全,基本都要特殊处理。 多WA了三次,不知道为什么交C++可以过,交G++就不行。 1 2 /* *********************************************** 3Author :111qqz 4Created Time :2016年02月19日 星期五 16时38分28秒 5File Name :code/hdu/1009.cpp 6************************************************ */ 7 8 #include <iostream>9 #include …
Read More