ICode9

精准搜索请尝试: 精确搜索
  • Problem J: IP地址2021-11-20 16:01:26

    错误:字符串减去48          用完初始化  这个题好麻烦啊,纯纯凑出来的 1 IP地址由四个整数跟三个'.'组成,就是“a.b.c.d”的形式。 2 a,b,c,d四个部分的数字位数都可以是1~3位,其整数值都在0~255之间。 3 不能有除了数字和'.'之外的字符出现。 就是找这三个条件的充要条件 #in

  • Problem H: 小学生算术2021-11-20 14:33:57

         知识点:输进去第一位是最高位,需要逆序(垃圾oj函数用不了还得自己写) ,或者从末尾处理(但是两个数可能长度不同,有点困难) 有999999 1的情况 ascII值减去48  ’0‘的值 #include<stdio.h> #include<string.h> void strrev1(char *y){ char d[20]=""; for(int x=strlen(y)-1

  • 随机化算法应用场景2021-11-18 19:03:30

    1.结合贪心乱搞 [link]{https://www.luogu.com.cn/problem/AT3672} 2.数据范围极小(状压),并且易构造,易验证 [link]{https://www.luogu.com.cn/problem/AT2657}

  • HDLBits学习------Problem 43~592021-11-15 21:32:44

    参考链接:HDLBits导学 Problem 43 Wire         问题:实现如下电路         解决: module top_module ( input in, output out); assign out = in; endmodule Problem 44 GND         问题:实现如下电路         解决: module top_module ( outpu

  • AB遇到的问题- 多重检验2021-11-14 20:02:00

    目录 多重检验问题(Multiple Testing Problem) 多重检验会发生什么问题?

  • Educational Codeforces Round 116 (Rated for Div. 2), problem: (C) Banknotes2021-11-11 22:02:57

    传送门 Problem - C - Codeforces   题目 题目重点内容手打翻译:(欢迎批评指正) 在柏林, 使用着n套不同的货币(banknotes)。第i个货币面额为10ai 元,货币的第一种只能是1定义f(s)为需要s元的最小货币数量,例如货币面额分别为1,10,100,然后f(59) = 14 :因为 九个面额1元的货币和五个面

  • 2021CCPC桂林 B. A Plus B Problem2021-11-08 11:03:33

    裸线段树板题,非常恶心 #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 10; struct { int l, r, len; int val, suf0, suf9; bool tag0, tag9; } t[N << 2]; int a[2][N], b[N]; inline void update(int p) { if (t[p << 1 | 1

  • G - THE MATRIX PROBLEM(差分约束&判负环优化)2021-11-07 20:59:41

    G - THE MATRIX PROBLEM(差分约束&判负环优化) 然后转差分约束判负环即可,最好建立一个超级源点,避免图不连通。 本题需要判负环的时候优化,即: + + i n

  • “21天好习惯”第一期-1 HDU2058 The sum problem2021-11-06 22:33:58

     题目链接:HUD2058 The sum problem #include <stdio.h> int main() { int m,n; int len,a; while(scanf("%d%d",&n,&m)!=EOF&&(m||n)) { len=sqrt(2.0*m); while(len>0) { a=m/len+

  • Codeforces Problem-318A Even Odds2021-11-05 21:58:12

    Codeforces Problem-318A Even Odds 基本思想:   本题大意很简单,考虑到n与k的范围很大,如果开数组或者vector容器可能会出问题(Memory Limit Exceeded),所以这道题的本质是找规律。 当n为偶数时,数列为1、3、5…n-1、2、4、6…n,显然,若k≤n/2时,第k个数为2k-1;否则,第k个数为2(k-n

  • GRYZ20211104 Simulation problem solving report2021-11-04 17:34:31

    目录T1 bookT2 programT3 maze Because my English is la, let me try to use English to write this report. Expect to score:\(100+100+0 \sim 50 = 200 \sim 250pts\) The actual score:\(100+100+25 = 225pts\) In front of the report, worship @斜揽残箫 Yeah, how a

  • Codeforces Problem-1030A In Search of an Easy Problem2021-11-04 12:03:54

    Codeforces Problem-1030A In Search of an Easy Problem AC代码: #include <bits/stdc++.h> using namespace std; int main() { int n; bool f=false; cin>>n; for (int i=1;i<=n;i++) { int z; cin>>z; if (z==1) f=true; } cout<

  • Swirles(漩涡) Court(阁) Maintenance Requests2021-11-04 09:59:48

    https://www.girton.cam.ac.uk/college-members/requests-and-forms/college-maintenance-requests You will be required to enter your Raven password to use the system. Please then: Select Requests and Report a problem Select the area in College you are reporti

  • 杭电oj:A + B Problem2021-11-03 09:04:59

    Problem - 1000 (hdu.edu.cn)   1、由于scanf()函数返回值为其输入数据的个数,当没有输入的时候将返回-1,所以可以以此来控制输入。 #include<iostream> #include<cstdio> using namespace std; int main() { int a,b; while(~scanf("%d%d",&a,&b)) printf("%d\n

  • data structure assignment problem record2021-11-02 23:31:11

    Question1: Similar to pause command in linux read -n 1 Question2 read : Illegal option -n 原因为ubuntu 默认的是dash 不是 bash Reference Question3: How to Compile C programing Language gcc hello.c -o hello Question4: Segmentation fault (core dumped)

  • 5、创建触发器2021-11-02 15:03:05

    触发器(Triggers):我们可以把zabbix的触发器理解成一个条件表达式,我们往往通过触发器定义被监控项的阈值,当触发器对应的表达式被满足时,则代表被监控项达到了我们设定的阈值,也就意味着发生了我们不想要遇到的问题,换句话说,当监控项的值处于合理范围时,触发器不会被触发,当监控项的值超出

  • Problem A: 小蛮腰2021-11-02 14:32:19

    Description 输出一个用符号组成的“小蛮腰”,如样例所示。 Input 输入一个奇数n>0,以及一个符号,中间用一个空格隔开。 Output 输出n行的一个“小蛮腰”。 Sample Input 7 * Sample Output ******* ***** *** * *** ***** ******* HINT 输入时,格式控制串需要使用"%d %c“,以便跳过

  • Educational Codeforces Round 116 (CF1606)2021-10-31 02:31:38

    A 2s Problem 给一个'a','b'组成的字符串 \(s\) ,每次修改可以把某个'a'改成'b'或把'b'改成'a',要求修改尽量少的次数使得 \(s\) 中 "ab"和"ba"子串的出现次数相等。输出修改后的 \(s\)。 Solution \(s\) 可以看作由若干"aa...a"和"b

  • 洛谷P1102 A-B 数对(A+B Problem)2021-10-30 20:59:15

    题目描述 出题是一件痛苦的事情! 相同的题目看多了也会有审美疲劳,于是我舍弃了大家所熟悉的 A+B Problem,改用 A-B 了哈哈! 好吧,题目是这样的:给出一串数以及一个数字 CC,要求计算出所有 A - B = CA−B=C 的数对的个数(不同位置的数字一样的数对算不同的数对)。 输入格式 输入共两行

  • CF464E The Classic Problem 题解2021-10-30 08:31:08

    Description 洛谷传送门 Solution emm……这是我为数不多的黑题之一,所以来写篇博客记录一下。 我们发现边权过大,只能用高精度来算,但是这样的复杂度太劣了,无法通过此题。 观察到边权只能是 \(2^x\),所以我们可以给它压成二进制数,然后跑最短路时单点加。 我们再来考虑一下 \(dijkst

  • Solution Of My Contest:playing with 毛玉2021-10-21 22:32:06

    problem A:等差之和 这是一道魔改题,启发自luogu P4231 三步必杀 易发现一个初始项\(a_1\)、公差\(b_1\)的等差数列与一个初始项\(a_2\)、公差\(b_2\)的等差数列相加得到一个初始项\((a_1+a_2)\)、公差\((b_1+b_2)\)的等差数列 考虑对固定区域的序列操作,发现可以简单维护初始项的标

  • No.1 A+B problem || 高精度算法初步2021-10-12 23:04:38

      从oj来的朋友可能会非常疑惑,为什么一个简单的A+B问题,还能被卡住呢?   请大家注意一下oj上面对于A,B 的数据的范围限制!其中,A,B都是不大于1000 位的数!    很显然,我们没有任何一种数据类型可以存放的下A,B的其中一个,这当然也就意味着我们无法用一般方法去直接进行加法运算。  

  • CodeForces - 687A NP-Hard Problem2021-10-12 13:59:02

    题意大致是将图中的点划分为两部分,就是求问二分图,输出划分成二分图的两部分分别是什么。 数据量稍微大一点,使用邻接表或者链式前向星存储。 算法实现过程大概如下划分: 实现前向星存储二分图染色判定结果输出 存储和输出没什么问题,输出也没有固定要求,答案不唯一,在判定的过程中

  • [噼昂!]problem(Pending)2021-10-07 23:00:07

    \[\color{red}{\text{校长者,真神人也,左马桶,右永神,会执利笔破邪炁,何人当之?}} \\ \begin{array}{|} \hline \color{pink}{\text{The principal is really a god}} \\ \color{pink}{\text{with a closestool on the left and Yongshen on the right}} \\ \color{pink}{\text{holdi

  • Problem 1030A In Search of an Easy Problem (Codeforces 800)2021-10-07 10:05:47

    In Search of an Easy Problem When preparing a tournament, Codeforces coordinators try treir best to make the first problem as easy as possible. This time the coordinator had chosen some problem and asked n

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

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

ICode9版权所有