题目链接:1144 The Missing Number (20 point(s))

Description

Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list.

Input Specification

Each input file contains one test case. For each case, the first line gives a positive integer N (≤10​5​​). Then N integers are given in the next line, separated by spaces. All the numbers are in the range of int.

Output Specification

Print in a line the smallest positive integer that is missing from the input list.

Sample Input

10
5 -25 9 6 1 3 4 2 5 17

Sample Output

7

分析

PAT(A) 1144 The Missing Number(C)统计的更多相关文章

  1. PAT 甲级 1144 The Missing Number (20 分)(简单,最后一个测试点没过由于开的数组没必要大于N)

    1144 The Missing Number (20 分)   Given N integers, you are supposed to find the smallest positive in ...

  2. PAT 甲级 1144 The Missing Number

    https://pintia.cn/problem-sets/994805342720868352/problems/994805343463260160 Given N integers, you ...

  3. PAT 1144 The Missing Number

    1144 The Missing Number (20 分)   Given N integers, you are supposed to find the smallest positive in ...

  4. PAT 1144 The Missing Number[简单]

    1144 The Missing Number(20 分) Given N integers, you are supposed to find the smallest positive integ ...

  5. [PAT] 1144 The Missing Number(20 分)

    1144 The Missing Number(20 分) Given N integers, you are supposed to find the smallest positive integ ...

  6. 1144 The Missing Number (20 分)

    Given N integers, you are supposed to find the smallest positive integer that is NOT in the given li ...

  7. 1144. The Missing Number (20)

    Given N integers, you are supposed to find the smallest positive integer that is NOT in the given li ...

  8. 1144 The Missing Number

    Given N integers, you are supposed to find the smallest positive integer that is NOT in the given li ...

  9. PAT_A1144#The Missing Number

    Source: PAT A1144 The Missing Number (20 分) Description: Given N integers, you are supposed to find ...

随机推荐

  1. 一个想要拥有正常的F1~F12的联想小新潮

    联想如何切换至正常的F1~F12 Fn+Fx的生活让我疲倦,实在难受,就开始了尝试关闭Fn 问题一:无法打开BIOS设置界面 重启,在开机界面时,按F2???顺利开机-(相较于台式机开机时,可以按F2 ...

  2. snprintf用错了快10年…

    int snprintf(char *str, size_t size, const char *format, ...); 从用snprintf开始,size参数一直传的都是buff_size-1, ...

  3. 深度学习面试题11:池化(same池化、valid池化、带深度的池化)

    目录 Same最大值池化 多深度的same池化 Same平均值池化 Valid池化 参考资料 池化(Pooling)操作与卷积类似,取输入张量的每个位置的矩形领域内的最大值或平均值作为该位置的输出. ...

  4. unity热更新AssetBundle框架设计_框架篇

    目录 第1 章 : AssetBundle框架整体设计 课时1:实战项目开发AB技术问题分析 10:53 课时2:实战项目开发AB技术解决方案 10:24 课时3:AB框架整体设计方案详解 09:45 ...

  5. MQTT教學(一):認識MQTT

    http://swf.com.tw/?p=1002 本系列文章旨在補充<超圖解物聯網IoT實作入門>,採用Arduino.ESP8266和Node.js實作MQTT物聯網通訊實驗. MQT ...

  6. python 设计模式之适配器模式 Adapter Class/Object Pattern

    #写在前面 看完了<妙味>和<华医>,又情不自禁的找小说看,点开了推荐里面随机弹出的<暗恋.橘生淮南>,翻了下里面的评论,有个读者从里面摘了一段自己很喜欢的话出来, ...

  7. Docker Rootless Container

    容器安全拾遗 - Rootless Container初探-云栖社区-阿里云https://yq.aliyun.com/articles/700923 medium.comhttps://medium ...

  8. JEECG hibernate.hbm2ddl.auto

    配置hibernate根据实体类自动建表功能 - lixuyuan的专栏 - CSDN博客https://blog.csdn.net/lixuyuan/article/details/8057119 ...

  9. lua:写了个基于协程的task调度库

    写了一个(不完整的)基于协程的task调度库 sample code如下 my_spawn( function () print('f: 1') local t1 = my_spawn( functi ...

  10. System.Net.WebRequest.cs

    ylbtech-System.Net.WebRequest.cs 发出对统一资源标识符(URI)的请求.这是一个 abstract 类. 1.返回顶部 1. #region 程序集 System, V ...