吃巧克力Ti
原创 2022-09-07 11:11:12
48阅读
codeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#include<string>2#include<iostream>3#include<map>4usingnamespacestd;56intmeasur...
转载 2010-08-13 15:41:00
73阅读
2评论
Problem DescriptionXiao Ming and Xiao Bao are playing a simple Numbers game. In a round Xiao Ming can choose to write down a number, or ask Xiao Bao what the kth great number is. Because the number
原创 2022-08-10 13:59:02
71阅读
1 public class Solution 2 { 3 public int MinDominoRotations(int[] A, int[] B) 4 { 5 var na = A.Length; 6 var nb = B.Length; 7 if (na !=
转载 2019-03-10 21:30:00
11阅读
代码如下:
转载 2018-03-24 17:25:00
40阅读
2评论
时间限制 400 的满足猜想的素数对
原创 2022-08-30 10:03:54
35阅读
其实吧,就是一个半平面交,而且不用考虑转回来的情况,所以只要极角排序然后用栈即可给的是点斜式,比极角很方便至于完整版的半平面交还没写过,看到再说吧 1 var a,b,c,q:array[0..50010] of longint; 2 v:array[0..50010] of boolean; 3 t,i,n:longint; 4 procedure swap(var
转载 2015-03-30 19:48:00
63阅读
2评论
题目大意:     序列“未排序程度”的一个计算方式是元素乱序的元素对个数。例如:在单词
原创 2022-09-26 10:06:17
15阅读
1007. Maximum Subsequence Sum (25)时间限制400 ms内存限制65536 kB代码长nce of K integers { N
原创 2022-08-30 10:10:42
71阅读
本文的翻译参考了http://blog.sina.com.cn/s/blog_61eccf0e0100epql.html1007 DNA 排序题目大意:    序列“未排序程度”的一个计算方式是元素乱序的元素对个数。例如:在单词序列“DAABEC'”中,因为D大于右边四个单词,E大于C,所以计算结果为5。这种计算方法称为序列的逆序数。序列
原创 2013-04-17 20:10:33
109阅读
//428K 0MS G++ mergeSort#include #include #include char str1[110];char str2[110];char tmp1[110];char tmp2[110];char strs[110][110];struc
原创 2023-05-23 16:09:50
79阅读
#include using namespace std;int main(){    intnumber,n=2000;    intflag=0,local;   while(cin>>number)    {       flag=0;       if(number==0)           break;       else if(number==1
原创 2022-08-23 09:34:55
51阅读
1007. 素数对猜想 (20)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, Yue让我们定义 dn 为:dn于n>
Problem Description
原创 2022-11-10 01:00:59
54阅读
1007 正整数分组 将一堆正整数分为2组,要求2组的和相差最小。 例如:1 2 3 4 5,将1 2 4分为1组,3 5分为1组,两组和相差1,是所有方案中相差最少的。 将一堆正整数分为2组,要求2组的和相差最小。 例如:1 2 3 4 5,将1 2 4分为1组,3 5分为1组,两组和相差1,是所
原创 2022-05-27 20:35:24
57阅读
51 Nod 1007 dp 1007 正整数分组1 秒 131,072 KB10 分2 级题将一堆正
原创 2023-04-25 00:05:34
42阅读
1007. 计算余数 (Standard IO) 时间限制: 1000 ms 空间限制: 262144 KB 具体限制 1007. 计算余数 (Standard IO) 时间限制: 1000 ms 空间限制: 262144 KB 具体限制 1007. 计算余数 (Standard IO) 时间限制:
原创 2021-06-04 20:10:47
195阅读
Problem DescriptionThe highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified
原创 2021-08-05 11:53:04
106阅读
平面最近点对模板题。
转载 2016-03-29 16:53:00
59阅读
2评论
#include <iostream>#include <algorithm>using namespace std;struct node{ char ch[52]; int unsort; bool operator<(const node& nd)const { return unsort<nd.unsort; }}dna[110];int us(char c[],int n){ int sum=0; for(int i=0;i<n-1;i++) for(int j=i+1;j<n;j++) if(c[i]>c[j]) sum
转载 2011-07-18 11:15:00
89阅读
2评论
  • 1
  • 2
  • 3
  • 4
  • 5