ICode9

精准搜索请尝试: 精确搜索
  • PAT 1005 Spell It Right 水题2020-03-01 13:44:39

    //1005 char a[105]; char* num[] = {"zero","one","two","three","four","five","six","seven","eight","nine"}; stack<char*> out; int main(){ while(s

  • PTA 1005 Spell It Right2020-02-27 16:57:49

    题目描述: Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specification: Each input file contains one test case. Each case occupies one line which contains an N (

  • 试题库问题2020-02-23 12:52:41

    弱弱的我不会网络流,发现这道题二分图也能水过,直接匈牙利不比Dinic好写一些吗??? #include<bits/stdc++.h> using namespace std; int n,k,need[25],vis[1005],match[1005],ans; vector<int>a[25],c[25]; int dfs(int col){ //printf("%d\n",col); for(int i=0;i<a[col].si

  • PAT乙级 1005 继续(3n+1)猜想2020-02-05 11:01:56

    卡拉兹(Callatz)猜想已经在1001中给出了描述。在这个题目里,情况稍微有些复杂。 当我们验证卡拉兹猜想的时候,为了避免重复计算,可以记录下递推过程中遇到的每一个数。例如对 n=3 进行验证的时候,我们需要计算 3、5、8、4、2、1,则当我们对 n=5、8、4、2 进行验证的时候,就可以直

  • Wannafly Camp 2020 Day 3A 黑色气球2020-02-04 21:50:53

    #include <bits/stdc++.h> using namespace std; int a[1005][1005],n,x[1005]; int main() { scanf("%d",&n); for(int i=1;i<=n;i++) { for(int j=1;j<=n;j++) { scanf("%d",&a[i][j]); }

  • Codeforces Round #574 (Div. 2)2020-02-03 16:55:33

    A - Drinks Choosing int cnt[1005]; void test_case() { int n, k; scanf("%d%d", &n, &k); for(int i = 1; i <= n; ++i) { int x; scanf("%d", &x); ++cnt[x]; } int cnt2 = 0; for(

  • HDU 10052020-01-27 19:42:34

    Problem Description A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7. Given A, B, and n, you are to calculate the value of f(n). Input The input consists of multiple test cases. Each test case conta

  • ZJNU 2135 - 小智的宝可梦2020-01-27 16:52:59

    因为成环 所以可以枚举第1只与第n只喂的次数 然后第1只和第2只的次数就固定了,以此类推,则所有宝可梦喂的次数都固定了 最后处理完检查是否全为0,不是则进行下一次枚举,是则直接输出Yes 如果所有枚举均不成立,输出No   1 /* 2 Written By. StelaYuri 3 On 2020/01/15 4 */ 5 #in

  • ZJNU 1367 - Party--中高级2020-01-26 23:52:26

    寻找从i到X,再从X到i的最短路 可以在正向图中从X开始跑一遍最短路,每个点的距离dis1[i]当作从X回到点i的距离 再将图反向从X再跑一遍,每个点的距离dis2[i]当作从i到点X的距离 最后搜索dis1[i]+dis2[i]值最大的输 1 /* 2 Written By StelaYuri 3 */ 4 #include<bits/stdc++.h> 5

  • pta乙级1005 继续(3n+1)猜想 java2020-01-26 19:36:16

    1005 继续(3n+1)猜想 (25分) 卡拉兹(Callatz)猜想已经在1001中给出了描述。在这个题目里,情况稍微有些复杂。 当我们验证卡拉兹猜想的时候,为了避免重复计算,可以记录下递推过程中遇到的每一个数。例如对 n=3 进行验证的时候,我们需要计算 3、5、8、4、2、1,则当我们对 n=5、8、4

  • PAT甲级——1005.SpellItRight(20分)2020-01-23 23:55:42

    Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specification: Each input file contains one test case. Each case occupies one line which contains an N (≤10 ​100 ​​

  • BZOJ 1005. [HNOI2008]明明的烦恼2020-01-23 14:02:23

    prufer序列为无根树的一种数列。长度为 $n - 2$prufer转无根树将最小编号的叶子删去,prufer序列加入其父亲。重复至树只剩下两个节点。无根树转prufer取出prufer首元素,与待选点集中最小未出现在prufer序列中的点连边,并将该点在待选点集中删去,直至待选点集剩下两个节点,将这两个节点

  • LeetCode 165. Compare Version Numbers2020-01-22 19:03:32

    题目 题意:比较两个版本的大小 题解: class Solution { public: int ver1[1005]; int pos1; int pos2; int ver2[1005]; int compareVersion(string version1, string version2) { int i,j; string s=""; for(i=0;i<versi

  • BZOJ 1000-10992020-01-21 22:55:01

    第一页的题解链接 BZOJ 1000-1009 BZOJ 1000 BZOJ 1001 BZOJ 1002 BZOJ 1003 BZOJ 1004 BZOJ 1005 BZOJ 1006 BZOJ 1007 BZOJ 1008 BZOJ 1009

  • PTA 乙级 JAVA实现 1005 继续(3n+1)猜想2020-01-21 19:38:18

    卡拉兹(Callatz)猜想已经在1001中给出了描述。在这个题目里,情况稍微有些复杂。 当我们验证卡拉兹猜想的时候,为了避免重复计算,可以记录下递推过程中遇到的每一个数。例如对 n=3 进行验证的时候,我们需要计算 3、5、8、4、2、1,则当我们对 n=5、8、4、2 进行验证的时候,就可以直

  • 并查集-E - Wireless Network2020-01-21 10:56:50

    E - Wireless Network An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in the network were all broken. The compu

  • 1005:地球人口承载力估计2020-01-16 20:39:20

    1005:地球人口承载力估计 时间限制: 1000 ms 内存限制: 65536 KB 提交数: 49304 通过数: 27276 【题目描述】 假设地球上的新生资源按恒定速度增长。照此测算,地球上现有资源加上新生资源可供x亿人生活a年,或供y亿人生活b年。 为了能够实现可持续发展,避免资源枯竭,

  • Matrix God 随机化构造矩阵降维2020-01-10 09:01:51

    https://codeforces.com/gym/101341/problem/I 题意: 给定三个矩阵ABC,问A*b是否等于c 代码: 1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 5 long long mod = 1e9+7; 6 7 long long a[1005][1005], b[1005][1005], c[1005][1005]; 8 l

  • Dairy Queen2020-01-01 20:03:00

    v奶牛Bassie去DQ打工,遇到一个客人给了一张好大面值的钞票,于是Bassie不得不为了给这位顾客找零而面对这样一个问题:现在店里一共有n种硬币,对这些不同种的硬币进行编号,编号为i的硬币面值为c[i] 。因为奶牛的手指头是有限的,因此他只能向你求助啦。(已知总需找零数为total)(1<=total<=1

  • 题解 洛谷P3955 【图书管理员】2019-12-14 18:53:31

    # 题解 P3955 【图书管理员】(论图书管理员有多懒) 洛谷原版:https://www.luogu.com.cn/blog/jvruo-0076/solution-p3955 Some ideas 首先,读入并存入数组,排列。取余查找*,有就输出**,无输出-1 * 用循坏!千万别用pow函数。虽然洛谷上pow能过,但一个系统一个数据。别的网站由于实数整数原因

  • 1005. K 次取反后最大化的数组和2019-12-05 23:00:51

    1005. K 次取反后最大化的数组和   描述: 给定一个整数数组 A,我们只能用以下方法修改该数组:我们选择某个个索引 i 并将 A[i] 替换为 -A[i],然后总共重复这个过程 K 次。(我们可以多次选择同一个索引 i。) 以这种方式修改数组后,返回数组可能的最大和。 示例 1: 输入:A = [4,2,3], K = 1

  • 1005 Spell It Right (20 分)2019-11-23 21:58:15

    题目链接: https://pintia.cn/problem-sets/994805342720868352/problems/994805519074574336 题目描述: Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specification: Each i

  • 20191111最大子矩型问题 | dp2019-11-11 19:56:53

    luogu1387最大正方形 O(n^2) 1 #include<cstdio> 2 #include<algorithm> 3 using namespace std; 4 int f[105][105]; 5 //f[i][j]代表以i,j为右下角的前i,j区域内的最大正方形 6 int main() 7 { 8 int n,m,ans = 0; 9 scanf("%d%d",&n,&m); 10

  • P1629 邮递员送信2019-10-14 23:56:12

    题目描述 有一个邮递员要送东西,邮局在节点1.他总共要送N-1样东西,其目的地分别是2~N。由于这个城市的交通比较繁忙,因此所有的道路都是单行的,共有M条道路,通过每条道路需要一定的时间。这个邮递员每次只能带一样东西。求送完这N-1样东西并且最终回到邮局最少需要多少时间。 输入格

  • PAT甲级1005水题飘过2019-10-08 19:50:27

    题目分析:用一个字符串输入之后遍历每一位求和后,不断%10获取最后一位存储下来,逆序用对应的英文单词输出(注意输入为0的情况) 1 #include<iostream> 2 #include<string> 3 using namespace std; 4 5 string a[10] = {"zero", "one", "two", "three", "four", &quo

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有